semget, semctl & semop

I am trying to port PostgreSQL which makes calls to semaphore
routines “semget, semop, and semctl”.

While these are not mentioned in documents at qdn, there is a
header file, “sem.h” which has external prototypes for them.
Are these for use? If so, which library? (A quick scan of *.a and
*.so did not come up with any mention of these routines.)

I am using the Windows based sdk for 6.0.
Sem.h is located at:
[drive]:\qnxsdk\qnx\neutrino\usr\nto\usr\include\sys\sem.h

PostgreSQL has some routines to implement these calls, but their
prototypes do not match those in “sem.h” – not sure which is right,
the PostgreSQL people have added a paramter based on an enum,
where QSSL (and others) deal with that via variable arguments.
extern int semctl(int semid, int semnum, int cmd, /* … / union semun
arg);
vs
int semctl(int semid, int semnum, int cmd, … /
union semun arg */);

Any thoughts, pointers, (help), would be appreciated.

thank you

Ignore sem.h ans use whatever comes with Postgres. Those functions aren’t
implemented in QNX.

  • igor

“Aaron Tucker” <aaron.tucker@igt.com> wrote in message
news:9qnsnm$7br$1@inn.qnx.com

I am trying to port PostgreSQL which makes calls to semaphore
routines “semget, semop, and semctl”.

While these are not mentioned in documents at qdn, there is a
header file, “sem.h” which has external prototypes for them.
Are these for use? If so, which library? (A quick scan of *.a and
*.so did not come up with any mention of these routines.)

I am using the Windows based sdk for 6.0.
Sem.h is located at:
[drive]:\qnxsdk\qnx\neutrino\usr\nto\usr\include\sys\sem.h

PostgreSQL has some routines to implement these calls, but their
prototypes do not match those in “sem.h” – not sure which is right,
the PostgreSQL people have added a paramter based on an enum,
where QSSL (and others) deal with that via variable arguments.
extern int semctl(int semid, int semnum, int cmd, /* … / union semun
arg);
vs
int semctl(int semid, int semnum, int cmd, … /
union semun arg */);

Any thoughts, pointers, (help), would be appreciated.

thank you

Hi Aaron…

I would say that perhaps you would consider using rtp 6.1A, and then you
may want to explore what you’ll find here:

http://developers.qnx.com/Misc/

NOTE: I myself have not checked the contents of these yet, so I do not
know if they have any content useful for you.

Regards…

Miguel.


Aaron Tucker wrote:

I am trying to port PostgreSQL which makes calls to semaphore
routines “semget, semop, and semctl”.

While these are not mentioned in documents at qdn, there is a
header file, “sem.h” which has external prototypes for them.
Are these for use? If so, which library? (A quick scan of *.a and
*.so did not come up with any mention of these routines.)

I am using the Windows based sdk for 6.0.
Sem.h is located at:
[drive]:\qnxsdk\qnx\neutrino\usr\nto\usr\include\sys\sem.h

PostgreSQL has some routines to implement these calls, but their
prototypes do not match those in “sem.h” – not sure which is right,
the PostgreSQL people have added a paramter based on an enum,
where QSSL (and others) deal with that via variable arguments.
extern int semctl(int semid, int semnum, int cmd, /* … / union semun
arg);
vs
int semctl(int semid, int semnum, int cmd, … /
union semun arg */);

Any thoughts, pointers, (help), would be appreciated.

thank you

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com