Skip to content
Permalink
Browse files

- Update package hashes.

- Add platform-independent thread API code.
  • Loading branch information...
valerius2k committed Apr 13, 2019
1 parent 1a2f8bd commit 04efd404248de0a49ef882dd5e3217509cd40046
Showing with 328 additions and 245 deletions.
  1. +7 −5 include/os3/thread.h
  2. +1 −0 platform/genode/include/platform/thread.h
  3. +10 −1 platform/genode/lib/symbols/compat
  4. +1 −1 platform/genode/recipes/api/compat/hash
  5. +1 −1 platform/genode/recipes/api/os3/hash
  6. +1 −1 platform/genode/recipes/pkg/os2/hash
  7. +1 −1 platform/genode/recipes/raw/os2_fs/hash
  8. +1 −1 platform/genode/recipes/src/compat/hash
  9. +1 −1 platform/genode/recipes/src/handle/hash
  10. +1 −1 platform/genode/recipes/src/libos2app/hash
  11. +1 −1 platform/genode/recipes/src/libos2exec/hash
  12. +1 −1 platform/genode/recipes/src/libos2fs/hash
  13. +1 −1 platform/genode/recipes/src/libos2srv/hash
  14. +1 −1 platform/genode/recipes/src/lx/hash
  15. +1 −1 platform/genode/recipes/src/memmgr/hash
  16. +1 −1 platform/genode/recipes/src/ne/hash
  17. +1 −1 platform/genode/recipes/src/os2app/hash
  18. +1 −1 platform/genode/recipes/src/os2exec/hash
  19. +1 −1 platform/genode/recipes/src/os2fs/hash
  20. +1 −1 platform/genode/recipes/src/os2srv/hash
  21. +1 −1 platform/genode/recipes/src/tar_rom/hash
  22. +0 −15 platform/genode/src/app/os2app/kal/thread.cc
  23. +10 −0 platform/genode/src/app/os2app/kal/thread2.cc
  24. +2 −4 platform/genode/src/app/os2app/target.mk
  25. +21 −12 platform/genode/src/lib/compat/thread.cc
  26. +1 −1 platform/l4env/build.cfg
  27. +1 −0 platform/l4env/include/platform/thread.h
  28. +163 −17 platform/l4env/src/lib/compat/thread.c
  29. +1 −1 platform/l4env/src/server/os2app/server/src/Makefile
  30. +0 −43 platform/l4env/src/server/os2app/server/src/kal/thread.c
  31. +20 −0 platform/l4env/src/server/os2app/server/src/kal/thread2.c
  32. +18 −5 platform/l4env/src/server/os2app/server/src/main.c
  33. +2 −1 platform/l4env/src/server/os2exec/server/src/main.c
  34. +6 −2 platform/l4env/src/server/os2fs/server/src/main.c
  35. +1 −1 shared/app/os2app/kal/kal.c
  36. +7 −7 shared/app/os2app/kal/start.c
  37. +35 −110 shared/app/os2app/kal/thread.c
  38. +2 −1 shared/server/os2srv/api/api.c
  39. +2 −1 shared/server/os2srv/initdone.c
@@ -29,18 +29,20 @@ void ThreadExit(void);

void TaskExit(int result);

l4_os3_thread_t ThreadCreate(ThreadFunc fn, void *data, ULONG flags);
l4_os3_thread_t ThreadMyself(void);

l4_os3_thread_t ThreadCreateLong(ThreadFunc fn, void *data, ULONG flags,
APIRET ThreadCreate(l4_os3_thread_t *thread, ThreadFunc fn, void *data, ULONG flags);

APIRET ThreadCreateLong(l4_os3_thread_t *thread, ThreadFunc fn, void *data, ULONG flags,
const char *name, ULONG stacksize);

void ThreadKill(l4_os3_thread_t native);

void ThreadSuspend(l4_os3_thread_t native);
void ThreadSuspend(l4_os3_thread_t native, ULONG *eip, ULONG *esp);

void ThreadResume(l4_os3_thread_t native);
void ThreadResume(l4_os3_thread_t native, ULONG *eip, ULONG *esp);

void ThreadWait(l4_os3_thread_t native);
l4_os3_thread_t ThreadWait(l4_os3_thread_t native);

#ifdef __cplusplus
}
@@ -11,6 +11,7 @@ typedef void * l4_os3_thread_t;

#define THREAD_SYNC 1
#define THREAD_ASYNC 2
#define THREAD_MAP 4

#ifdef __cplusplus
}
@@ -12,6 +12,7 @@ LockDone T
LockInit T
LockLock T
LockUnlock T
RegAreaAttach T
RegAreaAttachToRegion T
RegAreaRelease T
RegAreaReleaseAddr T
@@ -38,13 +39,18 @@ ThreadCreateLong T
ThreadEqual T
ThreadExit T
ThreadKill T
ThreadMyself T
ThreadResume T
ThreadSleep T
ThreadSuspend T
ThreadWait T
_Z11lookup_nodePv T
_Z8add_nodePvmmS_ T
_Z8del_nodePv T
attach_ds T
attach_ds_area T
attach_ds_reg T
call B 480
cfg_Getenv T
cfg_Getopt T
error T
@@ -57,12 +63,15 @@ get_name T
io_close_file T
io_load_file T
io_log T
ixf B 480
l4os3_errtostr T
options B 480
options_list D 456
root B 8
run B 480
runserver B 480
segment_gdt_get_entry_offset T
segment_gdt_set T
set B 2400
skiplist D 8
strupr T
type D 160
@@ -1 +1 @@
2019-03-10 5703cf834e1a6a236e79955825784fa3e912509a
2019-04-13-a d78535c818be71942503327edcc9e989f3b7bd72
@@ -1 +1 @@
2019-03-10 4b8233b88aa4f00da55753e0aa28485977e13cb9
2019-04-13 2cdca096074b37e331337fbcfcd22875ce5bd02d
@@ -1 +1 @@
2019-03-21-c 13d8737354e95dd0c0b87f52c3d1d12d7b91f9dc
2019-04-13-c 0eab4fadfcde1e2ffc18f5b2105279e4c44781c0
@@ -1 +1 @@
2019-03-21-c 127aad6819564b8395e54efc464681357b341ec5
2019-04-13-c 5f432eb7283428ff9ba9cd0cc6f200f6990a41c1
@@ -1 +1 @@
2019-03-21 7a492ce01c1a949894c30a4f19f31c6d806de4ba
2019-04-13-b d81ce98be2e385db03a873e7db346ca062322db4
@@ -1 +1 @@
2019-03-21 0be88e1b98ded811cd52b2db1b02641cf22ce1fb
2019-04-13 8486ae54fcfb0d8d5e91bd6613b3a36241c29949
@@ -1 +1 @@
2019-03-21 1615cdf031e43c37af62c8be7cc4c17e67181757
2019-04-13-b 87e88ae7933ae87c5e767464fdd8e780affd843c
@@ -1 +1 @@
2019-03-21 3806b150fbc97d0850a7c94933a44513f929e0ab
2019-04-13-b b9930a3803a79a26a15f8aa0578ba879924dec84
@@ -1 +1 @@
2019-03-21 5043e96bdc822e899eb81aa16e5420bfc709bfdf
2019-04-13-b 011ff9a2b9df52acce01bc35dd10c48a8f7c9b34
@@ -1 +1 @@
2019-03-21 5620bd3becd75c9c2bba8cb77b114b2bce10c614
2019-04-13-b dec037ec6d47d2eeb7fa68d75c818cde76f46306
@@ -1 +1 @@
2019-03-21 ec9244dad78d38a6ce955fc12bd3ba0b3d6220a1
2019-04-13-b 00915610317e7b6bf04a0b43e890859e5eb349a8
@@ -1 +1 @@
2019-03-21 bd2e63cf78bb8bd7c52533d1f1e4c121fe6b9927
2019-04-13 8b080c075abf10fcb98de81b25fe1f04caf66c91
@@ -1 +1 @@
2019-03-19 a712335961d46b205db79c4392f574d6f1406ffd
2019-04-13 b10a2c31e415d3fbc7b7045d50a8f9888588dd9b
@@ -1 +1 @@
2019-03-21 e86df2b62e7153c34b94e72d1ca226b4699f0bd5
2019-04-13-c 42aa08a6e0dc09c2cfacff197e6aeab91b1cc20f
@@ -1 +1 @@
2019-03-21 af44c4f48068f678e736e3ff0c39519901496a8e
2019-04-13-b 24bd8fb1644ac36889c82f6b1e0d3bf7098004d4
@@ -1 +1 @@
2019-03-21 e4d41eae48b6b61d629bbff1224c0c06a3eb4a1b
2019-04-13-b 70c0a614f75b42b911438c99a37d3879b8dcd3c7
@@ -1 +1 @@
2019-03-21 a6643bb9c4a157a2bf00dd844a94d97c58d4dbd9
2019-04-13-b 06585073bb5337a4918e48fa6b3d8a095bfe5163
@@ -1 +1 @@
2019-03-21 bd58dd1d4da3f17b7f93f968bacb9a04e70d30f4
2019-04-12 3eca665f2d82320dbcdb4ffd72180bc1bea5758e

This file was deleted.

@@ -0,0 +1,10 @@
/* osFree internal */
#include <os3/thread.h>

/* Genode includes */
#include <base/thread.h>

extern "C" void
exit_func(l4_os3_thread_t tid, void *data)
{
}
@@ -2,12 +2,10 @@ include $(REP_DIR)/mk/osfree.mk

TARGET = os2app
CC_CXX_WARN_STRICT =
SRC_CC = main.cc kal/thread.cc
SRC_C = initdone.c api/api.c \
SRC_CC = main.cc kal/thread2.cc
SRC_C = initdone.c api/api.c kal/thread.c \
kal/util.c kal/start.c kal/kal.c kal/dl.c
# disable dead code elimination
C_OPT += -fno-dce -fno-dse -fno-tree-dce -fno-tree-dse
CC_OPT += -fno-dce -fno-dse -fno-tree-dce -fno-tree-dse
LIBS = base libc compat os2srv os2fs os2exec

ifeq ($(filter-out $(SPECS),x86_32),)
@@ -60,29 +60,34 @@ TaskExit(int result)
}

extern "C" l4_os3_thread_t
ThreadCreate(ThreadFunc fn, void *data, ULONG flags)
ThreadMyself(void)
{
Genode::Thread *thread = Genode::Thread::myself();
return (l4_os3_thread_t)thread;
}

extern "C" APIRET
ThreadCreate(l4_os3_thread_t *thread, ThreadFunc fn, void *data, ULONG flags)
{
Genode::Allocator &alloc = genode_alloc();
Genode::Env &env = genode_env();
l4_os3_thread_t thread;

thread = (l4_os3_thread_t)new (alloc) OS2::Thread(env, fn, data, flags);
return thread;
*thread = (l4_os3_thread_t)new (alloc) OS2::Thread(env, fn, data, flags);
return NO_ERROR;
}

extern "C" l4_os3_thread_t
ThreadCreateLong(ThreadFunc fn, void *data, ULONG flags,
extern "C" APIRET
ThreadCreateLong(l4_os3_thread_t *thread, ThreadFunc fn, void *data, ULONG flags,
const char *name, ULONG stacksize)
{
Genode::Allocator &alloc = genode_alloc();
Genode::Env &env = genode_env();
l4_os3_thread_t thread;

thread = (l4_os3_thread_t)new (alloc) OS2::Thread(env, fn, data,
*thread = (l4_os3_thread_t)new (alloc) OS2::Thread(env, fn, data,
flags, name,
stacksize);

return thread;
return NO_ERROR;
}

extern "C" void
@@ -94,24 +99,28 @@ ThreadKill(l4_os3_thread_t native)
}

extern "C" void
ThreadSuspend(l4_os3_thread_t native)
ThreadSuspend(l4_os3_thread_t native, ULONG *eip, ULONG *esp)
{
Genode::Thread *thread = (Genode::Thread *)native;
Genode::Cpu_thread_client client(thread->cap());
client.pause();
*eip = client.state().ip;
*esp = client.state().sp;
}

extern "C" void
ThreadResume(l4_os3_thread_t native)
ThreadResume(l4_os3_thread_t native, ULONG *eip, ULONG *esp)
{
Genode::Thread *thread = (Genode::Thread *)native;
Genode::Cpu_thread_client client(thread->cap());
//client.start(esp, eip);
client.resume();
}

extern "C" void
extern "C" l4_os3_thread_t
ThreadWait(l4_os3_thread_t native)
{
Genode::Thread *thread = (Genode::Thread *)native;
thread->join();
return thread;
}
@@ -18,7 +18,7 @@ l4api = l4v2
# which pxegrub to use
GRUB = /tools/pxegrub-0.97-os.7
# memory given to a VM
MEM = 64
MEM = 128
# VNC display to connect to qemu VM
# DISPLAY = -display vnc=172.30.0.107:2
DISPLAY = -vnc 172.30.0.101:2
@@ -14,6 +14,7 @@

#define THREAD_SYNC L4THREAD_CREATE_SYNC
#define THREAD_ASYNC L4THREAD_CREATE_ASYNC
#define THREAD_MAP L4THREAD_CREATE_MAP

#ifdef __cplusplus
}

0 comments on commit 04efd40

Please sign in to comment.
You can’t perform that action at this time.