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

On 09/25/2013 05:05 AM, Jia He wrote:
> Hi Manfred
> IIUC after reivewing your patch and src code, does it seem
> sem_otime lost the chance to be updated when calling
> semctl_main/semctl_setval?
> In old codes, even whendo_smart_update(sma, NULL, 0, 0, &tasks),
> the otime can be updated after several conditions checking.
The update is performed now performed inside perform_atomic_semop():

Old code:
perform_atomic_semop() does not update sem_otime. It just returns 0 for
successfull operations.
This "0 returned" is passed upwards ("semop_completed") into
do_smart_update()
do_smart_update() updates sem_otime.

New code:
perform_atomic_semop() updates sem_otime immediately (your change).
No need to keep track if a waiting operation was completed (my change).

I don't see a problem - perhaps I overlook something.
Which problem do you see?

--
Manfred



\
 
 \ /
  Last update: 2013-09-25 09:21    [W:1.219 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site