diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-05-08 15:20:52 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-05-08 15:20:52 +0200 |
| commit | 7db5b33284eb1611ec1ae15b030ef146f6b46c1c (patch) | |
| tree | 66f5359a63d7dcd991d04c835f6c7c54ad85d00a /src/libtools/threads.c | |
| parent | 6607ddb15daeec7f54504a907e5db5013d3da618 (diff) | |
| download | box64-7db5b33284eb1611ec1ae15b030ef146f6b46c1c.tar.gz box64-7db5b33284eb1611ec1ae15b030ef146f6b46c1c.zip | |
Some small changes to thread and fork and cloning x64emu_t struct
Diffstat (limited to 'src/libtools/threads.c')
| -rwxr-xr-x | src/libtools/threads.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c index ebf3d669..707d3833 100755 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -215,7 +215,7 @@ x64emu_t* thread_get_emu() } void* stack = my_mmap(NULL, NULL, stacksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_GROWSDOWN, -1, 0); x64emu_t *emu = NewX64Emu(my_context, 0, (uintptr_t)stack, stacksize, 1); - SetupX64Emu(emu); + SetupX64Emu(emu, NULL); thread_set_emu(emu); return emu; } @@ -490,7 +490,7 @@ EXPORT int my_pthread_create(x64emu_t *emu, void* t, void* attr, void* start_rou emuthread_t *et = (emuthread_t*)box_calloc(1, sizeof(emuthread_t)); x64emu_t *emuthread = NewX64Emu(my_context, (uintptr_t)start_routine, (uintptr_t)stack, stacksize, own); - SetupX64Emu(emuthread); + SetupX64Emu(emuthread, emu); //SetFS(emuthread, GetFS(emu)); et->emu = emuthread; et->fnc = (uintptr_t)start_routine; @@ -512,7 +512,7 @@ void* my_prepare_thread(x64emu_t *emu, void* f, void* arg, int ssize, void** pet void* stack = my_mmap(NULL, NULL, stacksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_GROWSDOWN, -1, 0); emuthread_t *et = (emuthread_t*)box_calloc(1, sizeof(emuthread_t)); x64emu_t *emuthread = NewX64Emu(emu->context, (uintptr_t)f, (uintptr_t)stack, stacksize, 1); - SetupX64Emu(emuthread); + SetupX64Emu(emuthread, emu ); //SetFS(emuthread, GetFS(emu)); et->emu = emuthread; et->fnc = (uintptr_t)f; |