searching sem_t

I need sem_t structure but not find it. I searched in /usr/local and in your
directories.
I find
“typedef sync_t sem_t”
and after find
“typedef __SYNC_T sync_t”
after not find nothing.

Any idea,

Thanks,

Leandro Medina
(Ingdesi Group - R&D)

sem_t is available in /usr/include/semaphores.h
its defined as

typedef struct {
volatile long value;
long semid;
} sem_t



Leandro Medina wrote:

I need sem_t structure but not find it. I searched in /usr/local and in your
directories.
I find
“typedef sync_t sem_t”
and after find
“typedef __SYNC_T sync_t”
after not find nothing.

Any idea,

Thanks,

Leandro Medina
(Ingdesi Group - R&D)

Hello Herman,
sem_t is not in that header, I searched first there, but I didn’t found
it. In QNX 4 is there but in QNX 6 not.

Thanks,

Leandro.

“Hemant Mohan” <hemantm@pune.tcs.co.in> wrote in message
news:3B0C8A47.CF24857C@pune.tcs.co.in

sem_t is available in /usr/include/semaphores.h
its defined as

typedef struct {
volatile long value;
long semid;
} sem_t



Leandro Medina wrote:

I need sem_t structure but not find it. I searched in /usr/local and in
your
directories.
I find
“typedef sync_t sem_t”
and after find
“typedef __SYNC_T sync_t”
after not find nothing.

Any idea,

Thanks,

Leandro Medina
(Ingdesi Group - R&D)

Previously, Leandro Medina wrote in qdn.public.qnx4:

I need sem_t structure but not find it. I searched in /usr/local and in your
directories.
I find
“typedef sync_t sem_t”
and after find
“typedef __SYNC_T sync_t”
after not find nothing.

Any idea,

Thanks,

Leandro Medina
(Ingdesi Group - R&D)

If you’re absolutely desperate, try:

find / -type f -name ‘*.h’ | xargs fgrep ‘__SYNC_T’

  • Pete

Leandro Medina <lmedina@ingdesi.com> wrote:

I need sem_t structure but not find it. I searched in /usr/local and in your
directories.
I find
“typedef sync_t sem_t”
and after find
“typedef __SYNC_T sync_t”

after not find nothing.

That looks like QNX6 definition not QNX4.

For QNX6, you should find in <sys/target_nto.h> the following:

#undef __SYNC_T
#define __SYNC_T
struct _sync {
int count; /* Count for recursive mutexs and semaphores /
unsigned owner; /
Thread id (valid for mutex only) */
}

But, you aren’t supposed to use the internals of a sem_t anyway.

-David

QNX Training Services
dagibbs@qnx.com