Ixemul has better memory allocator but ixemul.library is not safe from application using native Amiga API.
can you more precise explain what go wrong ? sdl lib use native AOS functions too. so if it is not safe then it is not possible that sdl open a amiga window or amiga screen or use amiga os semaphores or other aos functions.
since version 47(i do not) ixemul use aos semaphores. so its possible to use aos and ixemul together for semaphore protect too
"Added low-level mutex (semaphore) functions: ix_mutex_lock(),
ix_mutex_attempt_lock() and ix_mutex_unlock(). These functions are
wrappers for the AmigaOS or p.OS kernel semaphore functions. See ix.h for
more info. "
i fix all problems, mainly thread safe problems, when more tasks of 1 program use ixemul functions.
it work now over years ok. netsurf is mix of aos function and unix functions.
only small limit is, that it is not possible to create a new task with the aos function, because for ixemul tasks need additional structure. but it crash if not do correct. as far i remember i add function IX_createtask or something that make it easy. have same parameter as aos function but create the structure need for unix functions
here is sdl code that create a new task using AOS functions
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{
/* Create the thread and go! */
char buffer[20];
#ifdef WARPOS
struct TagItem tags[6];
#endif
#ifdef SHARED_LIB
extern void *myLibPtr;
((thread_args *)args)->LibBase= myLibPtr;
D(bug("CreateThread: librarybase %lx\n",myLibPtr));
#endif
D(bug("Sending %lx to the new thread...\n",args));
sprintf(buffer,"%ld",args);
#ifdef WARPOS
tags[0].ti_Tag = TASKATTR_CODE; tags[0].ti_Data = (ULONG)RunThread;
tags[1].ti_Tag = TASKATTR_NAME; tags[1].ti_Data = (ULONG)"SDL subtask";
tags[2].ti_Tag = TASKATTR_STACKSIZE; tags[2].ti_Data = 100000;
tags[3].ti_Tag = (args ? TASKATTR_R3 : TAG_IGNORE); tags[3].ti_Data = (ULONG)args;
tags[4].ti_Tag = TASKATTR_INHERITR2; tags[4].ti_Data = TRUE;
tags[5].ti_Tag = TAG_DONE; tags[5].ti_Data = 0;
thread->handle=CreateTaskPPC(tags);
#else
unsigned int stack;
struct Task *t;
long *pid;
thread->handle=(struct Task *)CreateNewProcTags(
/*NP_Output, Output(),
NP_Input, Input(),*/
NP_Name, (ULONG)"SDL subtask",
/*NP_CloseOutput, FALSE,
NP_CloseInput, FALSE,*/
NP_StackSize, 100000,
NP_Entry, (ULONG)RunThread,
NP_Cli, TRUE,
NP_Arguments, (ULONG)buffer,
TAG_DONE);
/*Delay(1); // its a testhack dont activate
Disable();
struct Task *t;
struct Task *t2;
APTR *data;
t = FindTask(0);
data = t->tc_UserData;
t2 = thread->handle;
t2->tc_UserData = data;
Enable();*/
#endif
if(!thread->handle)
{
SDL_SetError("Not enough resources to create thread");
return(-1);
}
return(0);
}