From b945eafa126d6a17aa8826a405df7d5d4d999008 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Wed, 31 Mar 2010 17:26:21 +0200 Subject: Shared memory segment manager in userland --- src/kernel/ipc/request.c | 6 +++++- src/kernel/ipc/request.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/kernel') 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) }; -- cgit v1.2.3