lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] posix clocks: replace mutex with reader/writer semaphore
On Wed, 30 Mar 2011, Richard Cochran wrote:

> A dynamic posix clock is protected from asynchronous removal by a mutex.
> However, using a mutex has the unwanted effect that a long running clock
> operation in one process will unnecessarily block other processes.
>
> For example, one process might call read() to get an external time stamp
> coming in at one pulse per second. A second process calling clock_gettime
> would have to wait for almost a whole second.
>
> This patch fixes the issue by using a reader/writer semaphore instead of
> a mutex.

Yuck. /me wonders why we did not see that during the review :)



\
 
 \ /
  Last update: 2011-03-30 15:43    [W:0.054 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site