Date: Sat, 1 Jan 2000 16:49:21 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Tony Rentschler <walterr@bellatlantic.net> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: sem_otime not updated? Message-ID: <20000101164921.A2047@orion.ac.hmc.edu> In-Reply-To: <386E0EB2.C4C45660@bellatlantic.net>; from walterr@bellatlantic.net on Sat, Jan 01, 2000 at 09:26:58AM -0500 References: <386E0EB2.C4C45660@bellatlantic.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 01, 2000 at 09:26:58AM -0500, Tony Rentschler wrote: > I'm writing a program that uses a SysV semaphore, and it seems that the > sem_otime field of the semid_ds struct is not updated after a call to > semop. According to Steven's Unix Network Programming V2, the sem_otime > field is set to zero when the semaphore is created, then is updated with > the current time when semop is called. > > In /usr/sys/kern/sysv_sem.c on my 3.4 STABLE, I see that the sem_otime > field is set to zero in the semget call, but is never referred to > anyplace else. So, it looks like the source confirms my experiences. > > In a search of deja.com for sem_otime, I found a patch posted by Peter > Jeremy on 6/4/99, but, as far as I can tell, that's for CURRENT. > > I've never worked with FreeBSD at this (low) level, but I wonder if the > patch could be applied to STABLE? I'd prefer not to move to CURRENT, nor > to apply the patch myself (because I'll forget about it a couple of > months from now when I do a buildworld!). I took a look the history of /usr/sys/kern/sysv_sem.c using cvsweb and it looks like there was a change which may cause problem with using patch(1) to apply to patch, but the diffs were pretty straight forward (this was the suser change for jail) so you should be able to apply the patch by hand. That appears to have been the only real change to the file since some time around the fork off of 4.0. -- Brooks -- "Those who desire to give up freedom in order to gain security, will not have, nor do they deserve, either one" --Thomas Jefferson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000101164921.A2047>