[lkml]   [2013]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ipc/sem.c: fix update sem_otime when calling sem_op in semaphore initialization

On Mon, 23 Sep 2013 03:08:36 +0200 from wrote:
> On Sun, 2013-09-22 at 12:42 +0200, Manfred Spraul wrote:
>> Mike: no, your patch makes it worse:
>> - wait-for-zero semops still don't update sem_otime
>> - sem_otime is initialized to sem_ctime. That's not mentioned in the
>> sysv standard.
> So sem_otime = 0 is a specified semaphore state? I thought the proggy
> was busted for spinning on a (busted and) irrelevant stamp.
Please refer to the words from Unix Network Programming - Volume 2 2nd
Edition Chapter 11
"Fortunately, there is a way around this race condition. We are guaranteed
that thesem-otime member of the semid-ds structure is set to 0 when a
new semaphore set iscreated. (The System V manuals have stated this
fact for a long time, as do the XPG3and Unix 98 standards.) This member
is set to the current time only by a successful callto semop."
> Man lernt nie aus.
> -Mike

 \ /
  Last update: 2013-09-23 05:01    [W:0.103 / U:25.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site