summaryrefslogtreecommitdiff
path: root/lcms2mt/README.1ST
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2018-02-16 13:51:04 -0800
committerRay Johnston <ray.johnston@artifex.com>2018-03-28 22:08:40 -0700
commit9ff6b34e461fcbd4ef27fbb6c5c8a15071fe1370 (patch)
tree6996747ec44f0f2946bdb880369d942c70920652 /lcms2mt/README.1ST
parent33701ac07115cb2f634a40ab73a5c127ca870ad8 (diff)
downloadghostpdl-9ff6b34e461fcbd4ef27fbb6c5c8a15071fe1370.tar.gz
Make ICC profile management thread safe.
The change to ref_count of profiles needs to be protected by a lock if the profile ref_count could be changed by another thread. Also when decrementing the ref_count to 0, we cannot free the lock until after the profile has been unlocked. New routine gsicc_adjust_profile_rc replaces old (not threadsafe) function gsicc_profile_reference. Also add tracing "cname" to the RC_ADJUST_ macro to aid in debugging with -Z^ debug flag. Testing had revealed race conditions which are now fixed (eliminate use of semaphores). This also changes the gsicc_lcms2art.c interface functions to keep a list of transforms configured to have differing buffer formats that include alpha, planar IN/OUT, big_endian IN/OUT, bytes_per_component IN/OUT which are cloned as needed by threads. Change gscms_is_threadsafe to return "true" in gsicc_lcms2art.c TBD: If a link fails to build a thread may hang waiting for the link profile to become valid if it was not the thread that was building it. Not a new condition, but exposed when gscms_is_threadsafe returns true. TBD: Fix error handling / clean-up when links fail to build. Also not new, but is needed to prevent leaks, and possibly hang conditions.
Diffstat (limited to 'lcms2mt/README.1ST')
0 files changed, 0 insertions, 0 deletions