diff options
author | Alexis211 <alexis211@gmail.com> | 2010-03-31 17:26:21 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2010-03-31 17:26:21 +0200 |
commit | b945eafa126d6a17aa8826a405df7d5d4d999008 (patch) | |
tree | 34b5ba6f0c13b1b35770375f51183a047271a4d4 /src/kernel | |
parent | ad1ec29070e1ffba7461687cd268e64be06aa78b (diff) | |
download | TCE-b945eafa126d6a17aa8826a405df7d5d4d999008.tar.gz TCE-b945eafa126d6a17aa8826a405df7d5d4d999008.zip |
Shared memory segment manager in userland
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/ipc/request.c | 6 | ||||
-rw-r--r-- | src/kernel/ipc/request.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/kernel/ipc/request.c b/src/kernel/ipc/request.c index e59a66c..4e8b407 100644 --- a/src/kernel/ipc/request.c +++ b/src/kernel/ipc/request.c @@ -20,7 +20,11 @@ int request_get(int id, uint32_t ptr, int wait) { //when request pending (wait finished), write it to ptr struct user_request *p = (struct user_request*)ptr; p->func = obj->request->func; - for (i = 0; i < 3; i++) p->params[i] = obj->request->params[i]; + for (i = 0; i < 3; i++) { + p->params[i] = obj->request->params[i]; + if (obj->request->shm_sndr[i] != 0) p->shmsize[i] = obj->request->shm_sndr[i]->len; + else p->shmsize[i] = 0; + } p->isBlocking = (obj->request->requester != 0); //if request is nonblocking and no shm is to be mapped, delete request and unlock objects busymutex, else set it to acknowledged if (p->isBlocking) return 0; diff --git a/src/kernel/ipc/request.h b/src/kernel/ipc/request.h index 0afc48b..b08264f 100644 --- a/src/kernel/ipc/request.h +++ b/src/kernel/ipc/request.h @@ -28,7 +28,7 @@ struct request { }; struct user_request { - uint32_t func, params[3]; + uint32_t func, params[3], shmsize[3]; int isBlocking; // 1 : blocking request, 0 : nonblocking request (message) }; |