Section 5.12. Some AIX Nonstandard Programming Practices

5.12. Some AIX Nonstandard Programming Practices

When developing on any platform, it is sometimes impossible to avoid using platform-specific APIs. For instance, to develop device drivers, you must make use of platform-specific APIs, and these APIs are not portable from one platform to the next. Table 5-7 identifies some nonstandard programming practices that require some programming effort when porting from AIX to Linux.

Table 5-7. Nonstandard Programming References



Use of Object Data Manager (ODM) APIs: odm_add_obj, odm_change_obj, odm_close_class, and so on

Use and search the documentation for "Linux Device Driver Development."

Use of nlist

Look at lsof source code for nlist_private example.

Reading /dev/kmem directly

Port using /procfs and sysinfo API.

Use of Portable Stream Environment (PSE) and System V release 4 streams: t_accept, t_alloc, t_bind, t_close, t_connect, and so on

Use open-source Linux Streams (LiS) (

Use of /proc

Port using /procfs and sysinfo API.

In short, any low-level programming practices that interact with the kernel directly are all considered nonportable. Additional work will involve reverse engineering to come up with the same behavior and functionality on the targeted platform.

UNIX to Linux Porting. A Comprehensive Reference
UNIX to Linux Porting: A Comprehensive Reference
ISBN: 0131871099
EAN: 2147483647
Year: 2004
Pages: 175 © 2008-2017.
If you may any questions please contact us: