[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] Semaphore in different modules



Hello,

> I'm using RTlinux 3.0 with kernel 2.4.1.
> Is there a way to have different modules using the same semaphore?

Yes. Module 1:
sem_t semaphore;
...
sem_wait(&semaphore):

Module 2:
extern sem_t semaphore;
sem_post(&semaphore):

Module that defines the semaphore has to be loaded first of course.

Michael.