Closed Bug 585431 Opened 14 years ago Closed 13 years ago

implement threadsafety pieces of harfbuzz for win32

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: timeless, Assigned: timeless)

References

Details

Attachments

(1 file, 1 obsolete file)

this implementation is based on the work for bug 585425. But I haven't asked a compiler what it thinks.
Attached patch untested (obsolete) — Splinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #463915 - Flags: review?
Attachment #463915 - Flags: review? → review?(jfkthame)
I suggest using a CRITICAL_SECTION instead of a mutex. CRITICAL_SECTIONS do not trigger kernel mode switches when they are free.
yep, second CRITICAL_SECTION suggestion.  Also, we currently do rendering on only one thread, and already have cairo's thread safety disabled.  We should see what kind of perf hit (if any) this stuff gives, if we don't actually need it.
Attached patch untestedSplinter Review
ok, this is probably what critical_sections would look like. again i don't have a compiler handy.
Attachment #463915 - Attachment is obsolete: true
Attachment #464168 - Flags: review?
Attachment #463915 - Flags: review?(jfkthame)
Attachment #464168 - Flags: review? → review?(bas.schouten)
(In reply to comment #4)
> Created attachment 464168 [details] [diff] [review]
> untested
> 
> ok, this is probably what critical_sections would look like. again i don't have
> a compiler handy.

I haven't tested it, and it's certainly what it would look like. However do we really want a spin count that high? Seems to me like for a general purpose implementation like this we just want to stick at 0 or something low like that. This could potentially spin for quite a while.
the 0x8 bit is magical, the other bit isn't that big:

https://forums.codegear.com/thread.jspa?threadID=17554
OS: Windows XP → All
I don't think we should be patching this for now, as we don't actually need it. See bug 585425 comment #3.
Comment on attachment 464168 [details] [diff] [review]
untested

Cancelling review and jfkthame says we don't need this for now, please feel free to re-request if this situation changes of course.
Attachment #464168 - Flags: review?(bas.schouten)
Upstream HarfBuzz supports win32 threadsafety already.  This can be closed.
sounds good to me.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: