Changeset e74cb73 in mainline for generic/include/ipc/ipc.h
- Timestamp:
- 2006-03-14T09:30:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d1f8a87
- Parents:
- 27810c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/ipc/ipc.h
r27810c5 re74cb73 30 30 #define __IPC_H__ 31 31 32 #define IPC_CALL_LEN 2 32 /* Length of data being transfered with IPC call */ 33 /* - the uspace may not be able to utilize full length */ 34 #define IPC_CALL_LEN 4 33 35 34 36 /* Flags for calls */ 35 #define IPC_CALL_ANSWERED 1 37 #define IPC_CALL_ANSWERED 1 /**< This is answer to a call */ 38 #define IPC_CALL_STATIC_ALLOC 2 /**< This call will not be freed on error */ 39 36 40 /* Flags for ipc_wait_for_call */ 37 #define IPC_WAIT_NONBLOCKING 1 41 #define IPC_WAIT_NONBLOCKING 1 42 43 /* Flags of callid */ 44 #define IPC_CALLID_ANSWERED 1 45 46 /* Return values from IPC_ASYNC */ 47 #define IPC_CALLRET_FATAL -1 48 #define IPC_CALLRET_TEMPORARY -2 49 50 51 /* Macros for manipulating calling data */ 52 #define IPC_SET_RETVAL(data, retval) ((data)[0] = (retval)) 53 #define IPC_SET_METHOD(data, val) ((data)[0] = (val)) 54 #define IPC_SET_ARG1(data, val) ((data)[1] = (val)) 55 #define IPC_SET_ARG2(data, val) ((data)[2] = (val)) 56 #define IPC_SET_ARG3(data, val) ((data)[3] = (val)) 57 58 #define IPC_GET_METHOD(data) ((data)[0]) 59 #define IPC_GET_RETVAL(data) ((data)[0]) 60 61 #define IPC_GET_ARG1(data) ((data)[1]) 62 #define IPC_GET_ARG2(data) ((data)[2]) 63 #define IPC_GET_ARG3(data) ((data)[3]) 64 65 /* Well known phone descriptors */ 66 #define PHONE_NS 0 38 67 39 68 #ifdef KERNEL 40 69 41 #include <synch/ waitq.h>42 #include <synch/ spinlock.h>70 #include <synch/mutex.h> 71 #include <synch/condvar.h> 43 72 #include <adt/list.h> 44 73 … … 58 87 SPINLOCK_DECLARE(lock); 59 88 60 waitq_t wq; 89 mutex_t mutex; 90 condvar_t cv; 61 91 62 92 link_t connected_phones; /**< Phones connected to this answerbox */ … … 73 103 } phone_t; 74 104 75 extern void ipc_create_phonecompany(void);76 105 extern void ipc_init(void); 77 106 extern call_t * ipc_wait_for_call(answerbox_t *box, int flags); … … 83 112 extern void ipc_call_free(call_t *call); 84 113 extern call_t * ipc_call_alloc(void); 85 void ipc_answerbox_init(answerbox_t *box); 86 void ipc_phone_init(phone_t *phone, answerbox_t *box); 114 extern void ipc_answerbox_init(answerbox_t *box); 115 extern void ipc_phone_init(phone_t *phone, answerbox_t *box); 116 extern void ipc_call_init(call_t *call); 87 117 88 extern answerbox_t *ipc_ central_box;118 extern answerbox_t *ipc_phone_0; 89 119 90 120 #endif
Note:
See TracChangeset
for help on using the changeset viewer.