summaryrefslogtreecommitdiff
path: root/src/kernel/ipc/request.c
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-03-31 17:26:21 +0200
committerAlexis211 <alexis211@gmail.com>2010-03-31 17:26:21 +0200
commitb945eafa126d6a17aa8826a405df7d5d4d999008 (patch)
tree34b5ba6f0c13b1b35770375f51183a047271a4d4 /src/kernel/ipc/request.c
parentad1ec29070e1ffba7461687cd268e64be06aa78b (diff)
downloadTCE-b945eafa126d6a17aa8826a405df7d5d4d999008.tar.gz
TCE-b945eafa126d6a17aa8826a405df7d5d4d999008.zip
Shared memory segment manager in userland
Diffstat (limited to 'src/kernel/ipc/request.c')
-rw-r--r--src/kernel/ipc/request.c6
1 files changed, 5 insertions, 1 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;