Re: old prebinding workaround causes lossage in server-1.3
Re: old prebinding workaround causes lossage in server-1.3
- Subject: Re: old prebinding workaround causes lossage in server-1.3
- From: Rosyna <email@hidden>
- Date: Fri, 30 Nov 2007 03:49:56 -0700
I do wonder how this is related to prebinding at all? Other than
anything that changes the environment can cause a race condition to
be hit. Or not hit.
I don't actually know what this code is doing, but it's never thread
safe to pull events from the windowserver. Doesn't matter if it's
Carbon, Cocoa, or something else. Not thread safe.
If this function pulls events from the Windowserver, then it isn't
thread safe. (All keys go to the windowserver and are then dispatched
to the application by the windowserver).
Also, InitHLTB() should be useless. It just calls CFInitialize and
InitCarbonCore(). _InitCarbonCore() is a no-op that just returns
immediately (it doesn't even initialize the happy fun table). And
InitHLTB() only ever seems to be called by QuickTime. So I'm not sure
why it exists.
Ack, at 11/29/07, Ben Byer said:
DarwinHandleGui in quartz/quartzStartup.c contains this note:
/* Initially I ran the X server on the main thread, and received
events on the second thread. But now we may be using Carbon,
that needs to run on the main thread. (Otherwise, when it's
prebound, it will initialize itself on the wrong thread)
grr.. but doing that means that if the X thread gets scheduled
before the main thread when we're _not_ prebound, things fail,
so initialize by hand. */
extern void _InitHLTB(void);
_InitHLTB();
X11ControllerMain(argc, argv, server_thread, NULL);
exit(0);
So, there's been a longstanding, known race condition here -- which
may be caused by this workaround for a problem which shouldn't
actually exist on Leopard, since we no longer even do prebinding.
--
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden