Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Nov 1998 00:51:22 +0200
From:      Jeremy Lea <reg@shale.csir.co.za>
To:        current@FreeBSD.ORG
Subject:   poll() for pthreads?
Message-ID:  <19981105005122.A13038@shale.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi,

I've been playing some with getting Mozilla to compile under FreeBSD,
and have succeeded (to some extent - it's a moving target).  One thing
which I would like to do is enable NSPR (the NetScape Portable Runtime)
to use poll() under FreeBSD-current.  With a few changes to ifdef's I
can get it to work.

However, when I compile NSPR to use pthreads, then poll is not available
and I must use the fake poll() provided in NSPR.  The pthreaded version
of NSPR requires a poll() call of some form.

The CVS logs show that poll() is being hidden in libc_r because a
wrapper has not been written...  However, this is way out of my league. 
Does anyone have such a wrapper in their local tree, or is it a hard
thing to write?  And would looking at the NSPR thread-safe wrapper for
poll() help?

http://cvs-mirror.mozilla.org/webtools/lxr/source/nsprpub/pr/src/md/unix/uxwrap.c

Is there anyone who can help?  I'd like to see poll() used in official
ELF releases of Netscape in the future, especially if someone makes
kernel threads work...

Regards,
 -Jeremy

PS:  pthread.h prototypes pthread_attr_setinheritsched(), but there is
no such function.  In NSPR calls to any pthread_*sched* functions are
surrounded by _POSIX_THREAD_PRIORITY_SCHEDULING, which is a commented
out define in pthreads.h.  Maybe the prototypes should be hidden behind
this define?  At lease it will give a compile error, not a link error...

-- 
  |   "In this world of temptation, I will stand for what is right.
--+--  With a heart of salvation, I will hold up the light.
  |    If I live or if I die, if I laugh or if I cry,
  |    in this world of temptation, I will stand." -Pam Thum

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981105005122.A13038>