> >> My program is using the pth "cond" and "mutex"
> >> variables for synchronization between the threads.
> >> From a low priority thread, I am calling
> >> pth_cond_notify() and immediately a higher priority
> >> thread (which was there in the ready queue) was getting scheduled.

>       >Well, that's the purpose of 'pth_cond_notify'. It is, after all, a
>       >synchronization function.

>       I think in a non preemptive system, the library cannot force the
> application to
> yield the CPU unless the application by itself does an yield.

        I think a non-preemptive system should be as much like a pre-emptive system
as possible.

>       Is there any other call in Pth which can be used for sending a
> notification
> to a thread, without relinquishing the CPU ?

        Yes, just set your priority to the highest priority until you're ready to
let another thread run.

        DS


______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
Development Site                      http://www.ossp.org/pkg/lib/pth/
Distribution Files                          ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots                 ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to