diff options
author | Richard Cochran <richardcochran@gmail.com> | 2011-03-30 15:24:21 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-04-18 10:39:38 +0200 |
commit | 1791f881435fab951939ad700e947b66c062e083 (patch) | |
tree | 53739cfe3847e425b9bb64f22bc7526da26a9a0c /drivers/rtc | |
parent | a1b49cb7e2a7961ec3aa8b64860bf480d4ec9077 (diff) | |
download | op-kernel-dev-1791f881435fab951939ad700e947b66c062e083.zip op-kernel-dev-1791f881435fab951939ad700e947b66c062e083.tar.gz |
posix clocks: Replace mutex with reader/writer semaphore
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.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/%3C20110330132421.GA31771%40riccoc20.at.omicron.at%3E
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/rtc')
0 files changed, 0 insertions, 0 deletions