Closed
Bug 585425
Opened 15 years ago
Closed 13 years ago
implement threadsafety pieces of harfbuzz for os x
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: timeless, Assigned: timeless)
References
Details
Attachments
(1 file, 1 obsolete file)
2.72 KB,
patch
|
Details | Diff | Splinter Review |
HB_REFERENCE_COUNT_SET_VALUE/hb_atomic_int_set can't be implemented using Darwin's atomic ops afaict. One could just try to use foo = bar, but that doesn't seem like a good idea. Given that it isn't used, I think removing it makes sense.
The volatile bit might not actually be necessary.
This code compiles, but I haven't run with it. I believe it's correct.
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/atomic.3.html
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/pthread.3.html
http://developer.apple.com/macosx/multithreadedprogramming.html
is the only reference I can find for PTHREAD_MUTEX_INITIALIZER (thanks apple!, I love you too!)
I've decided to only use one operation for both Set and Get, it's easier to think about it this way
Attachment #463908 -
Attachment is obsolete: true
Attachment #463913 -
Flags: review?(jfkthame)
Attachment #463908 -
Flags: review?(jfkthame)
Comment 3•15 years ago
|
||
I don't think we need to worry about this for now (as we don't do multi-threaded text layout/rendering). It's something we may want to investigate later.
Also, rather than take patches (that we don't currently need) to the harfbuzz source in the mozilla repository, any work on this should happen upstream as part of the harfbuzz-ng project. We should only patch harfbuzz locally as a temporary measure if we really need to fix something that hasn't been done upstream yet, but thread-safety is not currently an issue for us.
The same applies to bug 585431.
OS: Mac OS X → Windows 7
jtfhame: so please take the patches upstream. some of us don't have infinite time to deal with dozens of upstream repositories. if you're involved upstream, then part of being r? involves you taking patches which belong upstream to upstream.
Comment 5•14 years ago
|
||
Comment on attachment 463913 [details] [diff] [review]
impl for os x
Clearing r? on this for now. We can look at it again if/when we actually need thread-safety here, and once the harfbuzz codebase is more stable.
Attachment #463913 -
Flags: review?(jfkthame)
Comment 7•14 years ago
|
||
Jonathan, can you please help me upstream this?
Comment 8•13 years ago
|
||
I implemented these upstream now. There was more work to be done as get() had to be compatible with const memory, which the patch here wasn't. But it's all working now.
The code still prefer's glib implementations over native. I know it's not relevant to Mozilla, but thought I ask anyway. Jonathan, what's your thoughts on the order? Shall we prefer native instead?
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Version: Trunk → 15 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•