ZCOM C I/F Library Routines

Introduction

Introduction

The ZCOM C interface library routines provide an application program interface to the ZCOM subsystem. These enable the application programmer to access to the ZCOM subsystem, transfer data, configure the system, check on the state of the ZCOM subsystem, etc.

Applications should link in the archive library libzcom_c.a or the shared library libzcom_c.sl with their program to use these functions. Two sets of libraries are provided: the 32-bit libraries support 32-bit programs, portable across both PA-RISC 1.1 and PA-RISC 2.0 hardware platforms, while the 64-bit libraries only support 64-bit programs running only on PA-RISC 2.0 64-bit hardware (wide mode). The 32/64-bit libraries have the same name, but the location is different; /opt/acc/lib for the 32-bit library, and /opt/acc/lib/pa20_64 for the 64-bit library. The library location can be specified by preceding the -l option to cc or ld with “-L<dir>”.

Note that the HP-UX 11.0 (or later) operating system supports cross platform development. Regardless of the hardware model, the compiler option +DA1.1 (or +DAportable) will generate a 32-bit program, while the option +DD64 (or +DA2.0W) will generate a 64-bit program.

All the ZCOM library routines are thread-safe and can be called from multi-threaded applications. They are implemented using the POSIX (1003.1c) kernel threads API package, therefore it is necessary to include the thread library libpthread.a after the ZCOM library. Refer to the man page pthread(3T) for more details on POSIX threads.

The following are the suggested compiler and linker options for ACC application program using the ZCOM C library:

32-bit program: +DA1.1 -L/opt/acc/lib -lzcom_c -lpthread

64-bit program: +DD64 -L/opt/acc/lib/pa20_64 -lzcom_c -lpthread

NOTE

All “Include” files formerly under /usr/include/zcom have been

 

relocated to /opt/acc/include/zcom. Users should add

 

-I/opt/acc/include to their “make” files, to direct the preprocessor to

 

also include any files in the directory specified.

 

 

136

Chapter 4