Re: [AD] END_OF_MAIN removal patch for msvc |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, Nov 16, 2008 at 11:42 PM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> On 16 Nov 2008, at 18:09, torhu wrote:
>> 3) OS X and QNX uses END_OF_MAIN to get hold of the address of
>> _mangled_main. A different solution needed?
>
> As far as I understand the situation on OS X (someone correct me if
> I'm wrong), the problem is that on OS X messages can only be received
> from the main thread.
That's right. We discussed earlier, and Peter W produced some code, to
return back from al_init to the user's main on a different thread. It
used ucontext which is implemented on 10.5 but not on earlier
versions. So could do it but we'd have to implement a little bit of
the ucontext functionality.
For cross platform purposes, the use of END_OF_MAIN needs to be all or
nothing - unless we can eliminate it from all platforms it has to stay
(even if it's a no-op)
Pete