Parameters
For most of the callable services, the parameters for the 31-bit
and 64-bit versions are the same; the only difference between the
versions is the AMODE of the caller. There is no change in the number
or length of the parameters. An example of this type is setuid():
Figure 1. setuid() parameters —
AMODE 31 and AMODE 64
The other callable services can be divided into three groups:
- Callable services that have doubleword instead of fullword
fields for parameter addresses in the 64-bit versionSome callable services, such as shmget(), have doubleword instead of fullword fields for parameter addresses in the 64-bit version. As shown in Figure 2, the 64-bit version of the shmget() service has a change in the size of the second parameter. For the 31-bit version (BPX1MGT), the Shared_Memory_Size parameter is 4 bytes long. For the 64-bit version (BPX4MGT), the Shared_Memory_Size parameter is 8 bytes long, to accommodate a possible new size of 16 petabytes:Figure 2. shmget() parameters — AMODE 31 and AMODE 64
- Callable services that have an additional parameter in the
64-bit version, such as loadhfs()
Other callable services, such as loadhfs(), have an additional parameter in the 64-bit version. Where addresses or lengths are passed back in the Return_value parameter, an 8-byte parameter is added to the 64-bit version of the service. (For compatability issues, the Return_value, Return_code, and Reason_code will always remain 4-byte fields.)
The 64-bit version of the loadhfs() service has an additional parameter. For BPX1LOD, the entry point address of the loaded HFS executable is returned in the Return_value parameter. For BPX4LOD, the 64-bit entry point address is returned in the 8-byte entry_point parameter.Figure 3. loadhfs() parameters — AMODE 31 and AMODE 64 - Callable services that use parameter structures with address
fields that are at different offsets in the 64-bit versionA subset of callable services use parameter structures whose 64-bit address fields are at different offsets from their 31-bit counterparts; or whose address fields, because of their increased size, have caused other fields in the structure to be at different offsets for AMODE 64 callers. These are:
- BPX4AIO, with the AIOCB structure
- BPX4RDV and BPX4WRV, with the iov structure
- BPX4SMS and BPX4RMS, with the MSGH and iov structures
For example, in the 64-bit version of the readv service, BPXB4RDV, the 64-bit address fields in the iov structure are at different offsets within the iov from their 31-bit counterparts:Figure 4. readv iov structure — AMODE 31 and AMODE 64
The descriptions of the individual callable services contain detailed information about using the services in 64-bit AMODE.