Hi all,
please confirm me.
1.
The type of massage to be passed must be
struct query {
pth_message_t head; // the first field got to be this
...
};
2.
I wrote a similar program to test_mp.c.
Differences are
i) message passing is one way ; main to the worker.
ii) in the main, pth_wait(ev) was replaced by pth_yield(NULL).
iii) no ticker
iv) main propt input of int, then send it to the worker.
worker siply print out the int.
It worked fine until the argument of pth_yield is replaced by the
pth_t of the worker. Then, the woker never get scheduled.
pth_wait calls pth_yield(NULL) internally, so the given code implicitely use it.
In other words, it's impossible to pass the control to the worker
directly from the main. Is there any work around for this?
TIA
--
Takashi Ishihara http://wwwcsif.cs.ucdavis.edu/~ishihara
;; The first precept was never to accept a thing as true until I knew it
;; as such without a single doubt. (Rene Descartes, 1637)
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]