Download User's Guide

Transcript
Appendix B
Communication libraries
Communication between modules is based on two libraries: posterLib for posters and csLib
for requests. This appendix presents a short overview of the functions of composing these
libraries.
B.1
Posters and posterLib
Posters are shared memory segments, that can be written by their owners and read by any
process. The basic poster handling functions and their prototypes are:
name
posterCreate
posterFind
posterWrite
posterRead
posterAddr
posterTake
posterGive
posterIoctl
posterDelete
posterShow
posterMemCreate
STATUS
STATUS
int
int
void *
STATUS
STATUS
STATUS
STATUS
STATUS
STATUS
description
poster creation
look for a poster id given its name
write into a poster
read a poster
get the poster address
take the poster semaphore
give the poster semaphore
query information about the poster (date, ...)
delete a poster
display the state of every poster
create a poster at the given address
posterCreate
posterFind
posterWrite
posterRead
posterAddr
posterTake
or
posterGive
posterIoctl
posterDelete
posterShow
posterMemCreate
(char *name, int size, POSTER_ID *id);
(char *name, POSTER_ID *id);
(POSTER_ID id, int offset, void *buf, int size);
(POSTER_ID id, int offset, void *buf, int size);
(POSTER_ID id);
(POSTER_ID id, POSTER_WRITE);
(POSTER_ID id, POSTER_READ);
(POSTER_ID id);
(POSTER_ID id, int code, char *parg);
(POSTER_ID id);
(void);
(char *name, int busSpace, void *pPool, int size,
POSTER_ID *id);
(busSpace:
POSTER LOCAL MEM,
POSTER VME A32, POSTER VME A24)
POSTER SM MEM,