Date: Mon, 18 Sep 2000 21:47:24 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.ORG> To: Mohan Krishna P <penumetcha@yahoo.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: RE: semaphores inside kernel??? Message-ID: <200009190447.VAA05044@john.baldwin.cx> In-Reply-To: <20000919035519.24195.qmail@web115.yahoomail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 19-Sep-00 Mohan Krishna P wrote: > hi, > > i am implementing a pseudo-devicer, many instaces of > this device may be > active, all have to share a resource. all instances > have to synchronize > their access to the resource. trying to implement > this, i ended up with a > less powerful version of semaphores. since the > resultant code became > little complex, i want to replace that with the more > generic semaphores. > > i checked the include files, but i couldn't find any > semaphore > functions(semget,semctl,semop) which are specific or > meant for use inside > kernel. does it mean they aren't available inside > kernel?? if i am wrong, > can someone suggest me how to use them?? In the most recent -current kernels, there is a new recursive mutex that you can use. See the mutex(9) manpage for details. > thank you, > mohan -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ 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?200009190447.VAA05044>