Re: sched_yield() needed for pthread_cond_signal(..) to work?

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

 



On Feb 18, 2008 7:51 PM,  <sven@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Sorry for top-posting.
>
> This looks a lot like LTP code, which is full of similar assumptions
>
> Note also that in RT above RT prio 50 signals don't get delivered, and a program waiting for a signal can lock the machine.
> Sent via BlackBerry by AT&T

Thanks a lot for all your feedback.

The implementation I did was flawed. This new example should run and print 1000.
I think there are  no more  bugs :) but I'll check again.

http://svn.arhuaco.org/svn/src/junk/trunk/threads/cond-signal-test-ok.c

I was confused with of pthread_signal and pthread_wait. I hadn't implemented
producer-consumer before. As the FAQ says, depending on sched_yield is bad
design and RT-Linux allows you to find bugs.

The snippet of code was an example to debug an implementation that we
are using now. We needed to port an application that uses RTEMS
(rtems_timer_create, rtems_timer_fire_after, rtems_timer_reset,
rtems_timer_cancel and
rtems_timer_delete). Now I will be able to complete the code. Once I
fix bugs, it should
be available here.

http://svn.arhuaco.org/svn/src/junk/trunk/threads/test_timer.c

I guess it could be useful to someone else porting from RTEMS to Linux-RT.

Regards,
Nelson.-

-- 
http://arhuaco.org
-
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux