Date: Thu, 15 Mar 2001 17:20:02 -0800 (PST) From: Archie Cobbs <archie@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: ports/devel/pth/files patch-aa Message-ID: <200103160120.f2G1K2i09421@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
archie 2001/03/15 17:20:02 PST Added files: devel/pth/files patch-aa Log: 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); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103160120.f2G1K2i09421>