[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
general question about nanosleep, usleep, semaphores and other waits.
Hi all
This is a general question.
When using nanosleep, sem_wait, usleep etc. in RT - threds these
funktion is performed as sleep. it meens the thread is suspended until
the wakeuptime ore call to sem_post from other thred. thats fine.
But what happens withe these funktions is called from a fifo handler or
in init_module. I know that nanosleep is busy wait, but what about fx.
sem_wait funktion. My first gees is busy wait. The reason for this is
the struct
truct rtl_sem_struct
{
int value;
spinlock_t lock; <- busy wait, handled differently if called
if thread
rtl_wait_t wait;
};
and my own test.
I think that it is importent to state the mode of the funktions. it
could cause a freese.
So if anybody know the ansvar please reply
Anders Gnistrup.
ps.
I think that the question is of general interrest.