Date: Wed, 7 Apr 1999 09:10:13 +0930 From: Greg Lehey <grog@lemis.com> To: Aldrin L <aldrin@americasnet.com>, "Brian O'Shea" <boshea@ricochet.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Semaphores Message-ID: <19990407091013.P2142@lemis.com> In-Reply-To: <Pine.BSF.4.05.9904061829060.284-100000@athome.logicStudios.org>; from Aldrin L on Tue, Apr 06, 1999 at 06:36:40PM -0300 References: <19990406113121.J2844@localdomain> <Pine.BSF.4.05.9904061829060.284-100000@athome.logicStudios.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 6 April 1999 at 18:36:40 -0300, Aldrin L wrote: > On Tue, 6 Apr 1999, Brian O'Shea wrote: > >> There are a few options depending on what you need semaphores for. >> If you need process-shared semaphores (ones that can be used to >> synchronize multiple processes, as opposed to just threads in the same >> process), then you will need to use the SysV semaphore interface (so >> you will need to compile a knernel with support for them). > > I was thinking about some sorta of serialization when writing to a > data file. My project is a SNPP (rfc1861) <-> TAP gateway for alphanumeric > paging devices. For simplicity and to faster devel., i chose to write is > as as an attached process to xinetd. The problem is that i need to write > batches of messages, and i think i have to care about its serialization. > Or not, if i do it atomically. Does FreeBSD supports the posixen "Atomic > Operations"? Why not use file locking? That's what it's for. >> p.s. Is there any particular reason for why you don't want to recompile >> your kernel? > > The first: just to know which IPC options i had under freebsd; > Secondly: I'm a lazy person. Just want to avoid kernel > compiles. It sounds like your laziness could get you into a whole lot more work. You just have to make sure these options are in your config file. It's not much: # These three options provide support for System V Interface # Definition-style interprocess communication, in the form of shared # memory, semaphores, and message queues, respectively. # options SYSVSHM options SYSVSEM options SYSVMSG Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990407091013.P2142>