Date: Mon, 31 Jul 2000 14:03:04 -0500 From: Chris Costello <chris@calldei.com> To: Bjorn Tornqvist <bjorn@tornqvist.net> Cc: Nate Williams <nate@yogotech.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: BSD,Posix,Linux Threading - Are they really useable? Message-ID: <20000731140304.Y37935@holly.calldei.com> In-Reply-To: <398534AF.467DE4D5@tornqvist.net> References: <398111DA.443B41F9@tornqvist.net> <20000728003913.K37935@holly.calldei.com> <200007281538.JAA22915@nomad.yogotech.com> <20000728140854.L37935@holly.calldei.com> <398534AF.467DE4D5@tornqvist.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, July 31, 2000, Bjorn Tornqvist wrote: > But how do I know if my pthreads aren't secretely blocking for a very > short time in read() and write()? Documentation anywere? They 'block' for the duration of time it takes to make a non-blocking call to read() or write(), which is, as far as your program cares, practically zero. > > I thought he had seen the term 'kernel threads' in the context > > of FreeBSD before, likely in the context of kthread_create() in > > the kernel. > Actually I have, but I haven't tried them since I found no documentation > on them (I even emailed peter@freebsd.org (he's listed as maintainer in > sys/kthread.h) but got no reply). Just aswell, seeing how wrong I was. > I think I'll stick to pthreads for now; which will make it easier to > modify the code later on when we have ''real'' threads. (Sorry, I come > from a BeOS background). Pthreads is only a specification of an interface, not a form of user threads. We just implement them in the form of user threads. > Another question for you all: Does FreeBSD have any notion of kernel > mutexes and/or semaphores (that can be used to control concurrent > processes), and that can be shared between processes using pthreads? > pthread_mutex_init is local to a process and thus of little use. (FYI: > The application my company is developing consists of several processes, > all of which must have a couple of worker threads). Yes. We do have SysV shared memory support. Try ``man -k ^shm'' and ``man -k ^sem''. -- |Chris Costello <chris@calldei.com> |Printed on 100% recyclable phosphor. `------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000731140304.Y37935>