Changeset 2d5a54f3 in mainline for generic/include/ipc
- Timestamp:
- 2006-03-16T00:25:50Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2fb49101
- Parents:
- c23502d
- Location:
- generic/include/ipc
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
generic/include/ipc/ipc.h
rc23502d r2d5a54f3 69 69 #define PHONE_NS 0 70 70 71 /* System-specific methods - only through special syscalls 72 * These methods have special behaviour 73 */ 74 #define IPC_M_IAMCONNECTING 0 75 /** Protocol for CONNECT - TO - ME 76 * 77 * Calling process asks the callee to create a callback connection, 78 * so that it can start initiating new messages. 79 * 80 * The protocol for negotiating is as follows: 81 * - sys_connecttome - sends a message IPC_M_CONNECTTOME 82 * - sys_wait_for_call - upon receipt tries to allocate new phone 83 * - if it fails, responds with ELIMIT 84 * - passes call to userspace. If userspace 85 * responds with error, phone is deallocated and 86 * error is sent back to caller. Otherwise 87 * the call is accepted and the response is sent back. 88 * - the allocated phoneid is passed to userspace as 89 * ARG3 of the call. 90 * - the caller obtains taskid of the called thread 91 */ 92 #define IPC_M_CONNECTTOME 1 93 #define IPC_M_CONNECTMETO 2 94 95 96 /* Well-known methods */ 97 #define IPC_M_FIRST_USER 512 98 #define IPC_M_PING 512 99 /* User methods */ 100 #define FIRST_USER_METHOD 1024 101 71 102 #ifdef KERNEL 72 103 … … 77 108 #define IPC_MAX_PHONES 16 78 109 79 80 110 typedef struct answerbox answerbox_t; 111 typedef __native ipc_data_t[IPC_CALL_LEN]; 81 112 82 113 typedef struct { … … 85 116 int flags; 86 117 task_t *sender; 87 __native data[IPC_CALL_LEN];118 ipc_data_t data; 88 119 } call_t; 89 120 90 121 struct answerbox { 91 122 SPINLOCK_DECLARE(lock); 123 124 task_t *task; 92 125 93 126 mutex_t mutex; -
generic/include/ipc/sysipc.h
rc23502d r2d5a54f3 27 27 */ 28 28 29 #ifndef __ NS_H_30 #define __ NS_H_29 #ifndef __SYSIPC_H__ 30 #define __SYSIPC_H__ 31 31 32 /* NameService methods */ 33 34 /** Ping name service */ 35 #define NS_PING 1 36 37 38 #ifdef KERNEL 39 40 #include <ipc/ipc.h> 41 42 extern void ns_start(void); 32 __native sys_ipc_call_sync_fast(__native phoneid, __native method, 33 __native arg1, __native *data); 34 __native sys_ipc_call_sync(__native phoneid, __native *question, 35 __native *reply); 36 __native sys_ipc_call_async_fast(__native phoneid, __native method, 37 __native arg1, __native arg2); 38 __native sys_ipc_call_async(__native phoneid, __native *data); 39 __native sys_ipc_answer_fast(__native callid, __native retval, 40 __native arg1, __native arg2); 41 __native sys_ipc_answer(__native callid, __native *data); 42 __native sys_ipc_connect_to_me(__native phoneid, __native arg1, 43 __native arg2, task_id_t *taskid); 44 __native sys_ipc_wait_for_call(ipc_data_t *calldata, task_id_t *taskid, 45 __native flags); 43 46 44 47 #endif 45 46 #endif
Note:
See TracChangeset
for help on using the changeset viewer.