CVS log for ports/devel/pth/files/Attic/patch-aa
Up to [FreeBSD] / ports / devel / pth / files
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.2
Sun Mar 25 14:12:16 2001 UTC (10 years, 10 months ago) by rse
Branches: MAIN
CVS tags: HEAD
FILE REMOVED
Changes since revision 1.1: +0 -0 lines
Upgrade to GNU Portable Threads (Pth), version 1.4.0
Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Mar 16 01:20:02 2001 UTC (10 years, 10 months ago) by archie
Branches: MAIN
This patch fixes a scheduling bug and is to be incorporated in the
next version. In the meantime, apply with the port.
FYI, the bug is demonstrated by this program:
#include <stdio.h>
#include <stdlib.h>
#include <pth.h>
static int check_something(void *arg)
{
return (0);
}
static void *thread(void *arg)
{
printf("thread sleeping five seconds...\n");
pth_nap(pth_time(5, 0));
printf("thread is done sleeping\n"); /* bug: we never get here */
return (NULL);
}
int main(int ac, char **av)
{
pth_event_t ev;
pth_init();
pth_spawn(NULL, thread, NULL);
ev = pth_event(PTH_EVENT_FUNC, check_something, NULL, pth_time(2, 0));
while (1)
pth_wait(ev);
}
