We've defined struct __sigevent32 and struct __sigevent64, in addition to struct sigevent. The OS handles either form in both 32- and 64-bit architectures.
Since a sigevent might be passed between 32- and 64-bit programs, we've defined a SIGEV_64BIT flag that indicates which type of sigevent it is. We OR this flag into the sigev_notify types. For example, in addition to SIGEV_SIGNAL, we have SIGEV_SIGNAL32 and SIGEV_SIGNAL64:
Some programs use SIGEV_NONE to identify an empty sigevent. For compatibility, SIGEV_NONE is always the same as SIGEV_NONE32, no matter which architecture you compile for.
If your program stores sigevents from 32- and 64-bit programs, you should replace struct sigevent with a union:
union { struct sigevent ev; struct __sigevent32 ev32; struct __sigevent64 ev64; };
Your code can then check ev.sigev_notify, determine whether the sigevent is from a 32- or 64-bit program, and then use the ev32 or ev64 structure, as appropriate.
For more information, see the entry for sigevent in the C Library Reference. See also New kernel calls and macros for sigvals in this chapter.