summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-03-24 15:40:16 +0100
committerAlexis211 <alexis211@gmail.com>2010-03-24 15:40:16 +0100
commitdbfa8cae66811247e5110e2e17f1c6ae5d1b2bcd (patch)
tree793b49a6b89c1113c74ae3ee97d197f6070cb7a7 /doc
parentcbadacbb881200b601c7b53b29aa0c1b78747692 (diff)
downloadTCE-dbfa8cae66811247e5110e2e17f1c6ae5d1b2bcd.tar.gz
TCE-dbfa8cae66811247e5110e2e17f1c6ae5d1b2bcd.zip
IPC not tested but suposedly working.
Diffstat (limited to 'doc')
-rw-r--r--doc/objects-requests.txt20
-rw-r--r--doc/syscalls.txt15
2 files changed, 32 insertions, 3 deletions
diff --git a/doc/objects-requests.txt b/doc/objects-requests.txt
index 9169552..e53c343 100644
--- a/doc/objects-requests.txt
+++ b/doc/objects-requests.txt
@@ -1,11 +1,25 @@
+The requests can be of two types :
+- Blocking, IE the sender waits for an answer
+- Nonblocking, the request is a simple message.
+
Requests are identified by a 32bit function number, composed as follows :
(8 bit) parameter and return type ; (24bit) function number
the first 8 bits are :
- 2bit answer type ; 2bit parameter a ; 2bit parameter b ; 2bit parameter c
+ 2bit answer type ; 2bit parameter a type ; 2bit parameter b type ; 2bit parameter c type
each two bit couple can be one of the following :
- 00 : void
- 01 : object descriptor number (will be copied with a new number to reciever)
-- 10 : integer
-- 11 : long long (replies), or shared memory offset (requests and messages)
+- 10 : long
+- 11 : long long (replies), or shared memory offset in sender's space (requests and messages)
+
+When shared memory segments are sent as request parameters from a process to the same process, the pointer
+to the memory is kept and sent to the handler function. If handler is in another process, receiver will
+have to call request_mapShm specifying a pointer. Shared memory is automatically unmapped when requests
+yields an answer, and is kept when the request is nonblocking (message).
+
+When objects are sent as request parameters, the receiver process will get an immediately usable object
+descriptor. The descriptor is closed in blocking requests after the request yields an answer (except if the
+request is handled in the same process than the sender, OR if the receiver already had a descriptor to
+this object). The descriptor is kept when sent by a nonblocking request (message).
diff --git a/doc/syscalls.txt b/doc/syscalls.txt
index 663618d..2972b97 100644
--- a/doc/syscalls.txt
+++ b/doc/syscalls.txt
@@ -16,5 +16,20 @@ id=eax Name Parameters Description
8 shm_create ebx: offset Create a shared memory segment at offset (ret = errcode)
ecx: length
9 shm_delete ebx: offset Delete a shared memory segment at offset (ret = errcode)
+ 10 object_create none Creates an object for current process (returns a descriptor to it)
+ 11 object_owned ebx: object descriptor True (1) if object with this descriptor is ours, false(0) elsewhere
+ 12 object_close ebx: object descriptor Closes descriptor to an object (deleting it if necessary)
+ 13 request_get ebx: object descriptor Gets a request pending on object (only if we own it)
+ ecx: pointer to write request
+ edx: wait for a request ?
+ 14 request_has ebx: object descriptor Is there a request waiting on this object ?
+ 15 request_answer ebx: object descriptor
+ ecx, edx: answer Answer a request on object
+ 16 request_mapShm ebx: object descriptor Map shared memory sent with request to receiver's address space
+ ecx: offset
+ edx: parameter number (0, 1 or 2)
+ 17 request ebx: object descriptor Send a blocking request to object
+ ecx: pointer to user_sendrequest struct with information
+ 18 send_msg same as above Send a nonblocking request to object, same as above
If a processes wishes to exit with an error code, it HAS to use process_exit. thread_exit will do nothing.