Project

General

Profile

Actions

Patch #810

closed

Slim read/write locks on Windows

Added by Marco Eichelberg over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
2018-01-29
Due date:
% Done:

100%

Estimated time:
Module:
Operating System:
Compiler:

Description

Accesses to the data dictionary are protected by a critical section and a semaphore implemented in class OFReadWriteLock.
Since Windows Vista, Windows offers "Slim Reader/Writer Locks" (https://msdn.microsoft.com/en-us/library/windows/desktop/aa904937%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396) that offer better concurrency when there are parallel threads that only read the data dictionary.
The attached patch replaces the existing implementation with SRW locks, which, however, different unlock methods for read locks
and write locks.

The patch may also affect Android (via POSIX_INTERFACE_WITHOUT_RWLOCK) - this was not considered when developing the patch
and may require special handling.

Submitted 2018-01-24 by Christian Fremgen <>.


Files

dcmtk-3.6.2-SlimReaderWriterLock.patch (23.5 KB) dcmtk-3.6.2-SlimReaderWriterLock.patch Patch Marco Eichelberg, 2018-01-29 16:11
main.cpp (576 Bytes) main.cpp Test program that demonstrates the patch Marco Eichelberg, 2018-01-29 16:12
Actions #1

Updated by Marco Eichelberg about 7 years ago

  • Status changed from New to Closed
  • Assignee set to Marco Eichelberg
  • % Done changed from 0 to 100

Closed by commit #1e6aefd.

Actions

Also available in: Atom PDF