|
Files |
file | adb.h |
| ADB device interface.
|
file | bd.h |
file | char.h |
| Character device interface.
|
file | clipboard.h |
file | common.h |
file | console.h |
file | fb.h |
file | ipc.c |
file | ipc.h |
file | irc.h |
file | loader.h |
file | net.h |
| Networking common message definitions.
|
file | ns.h |
file | services.h |
| List of all known services and their codes.
|
file | vfs.h |
Data Structures |
struct | async_call_t |
| Structures of this type are used for keeping track of sent asynchronous calls and queing unsent calls. More...
|
struct | ipc_call_t |
struct | vfs_info_t |
| A structure like this is passed to VFS by each individual FS upon its registration. More...
|
Networking specific message arguments definitions |
#define | IPC_GET_COUNT(call) ((size_t) IPC_GET_ARG2(call)) |
| Return the count message argument.
|
#define | IPC_GET_DEVICE(call) ((device_id_t) IPC_GET_ARG1(call)) |
| Return the device identifier message argument.
|
#define | IPC_GET_ERROR(call) ((services_t) IPC_GET_ARG4(call)) |
| Return the error service message argument.
|
#define | IPC_GET_MTU(call) ((size_t) IPC_GET_ARG2(call)) |
| Return the maximum transmission unit message argument.
|
#define | IPC_GET_PACKET(call) ((packet_id_t) IPC_GET_ARG2(call)) |
| Return the packet identifier message argument.
|
#define | IPC_GET_PHONE(call) ((int) IPC_GET_ARG5(call)) |
| Return the phone message argument.
|
#define | IPC_GET_SENDER(call) ((services_t) IPC_GET_ARG3(call)) |
| Return the sender service message argument.
|
#define | IPC_GET_SERVICE(call) ((services_t) IPC_GET_ARG3(call)) |
| Return the device driver service message argument.
|
#define | IPC_GET_STATE(call) ((device_state_t) IPC_GET_ARG2(call)) |
| Return the device state message argument.
|
#define | IPC_GET_TARGET(call) ((services_t) IPC_GET_ARG3(call)) |
| Return the target service message argument.
|
#define | IPC_SET_ADDR(answer, value) IPC_SET_ARG1(answer, (sysarg_t) (value)) |
| Set the minimum address length in the message answer.
|
#define | IPC_SET_CONTENT(answer, value) IPC_SET_ARG3(answer, (sysarg_t) (value)) |
| Set the maximum content size in the message answer.
|
#define | IPC_SET_DEVICE(answer, value) IPC_SET_ARG1(answer, (sysarg_t) (value)) |
| Set the device identifier in the message answer.
|
#define | IPC_SET_PREFIX(answer, value) IPC_SET_ARG2(answer, (sysarg_t) (value)) |
| Set the minimum prefix size in the message answer.
|
#define | IPC_SET_SUFFIX(answer, value) IPC_SET_ARG4(answer, (sysarg_t) (value)) |
| Set the minimum suffix size in the message answer.
|
Networking message intervals |
#define | IS_NET_ARP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_ARP_FIRST, NET_ARP_LAST) |
| Check if the IPC call is an ARP message.
|
#define | IS_NET_ETH_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_ETH_FIRST, NET_ETH_LAST) |
| Check if the IPC call is an Ethernet message.
|
#define | IS_NET_ICMP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_ICMP_FIRST, NET_ICMP_LAST) |
| Check if the IPC call is an ICMP message.
|
#define | IS_NET_IL_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_IL_FIRST, NET_IL_LAST) |
| Check if the IPC call is an inter-network layer message.
|
#define | IS_NET_IP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_IP_FIRST, NET_IP_LAST) |
| Check if the IPC call is an IP message.
|
#define | IS_NET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_FIRST, NET_LAST) |
| Check if the IPC call is a generic networking message.
|
#define | IS_NET_NET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_NET_FIRST, NET_NET_LAST) |
| Check if the IPC call is a generic networking message.
|
#define | IS_NET_NIL_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_NIL_FIRST, NET_NIL_LAST) |
| Check if the IPC call is a network interface layer message.
|
#define | IS_NET_PACKET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_PACKET_FIRST, NET_PACKET_LAST) |
| Check if the IPC call is a packet manaagement system message.
|
#define | IS_NET_SOCKET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_SOCKET_FIRST, NET_SOCKET_LAST) |
| Check if the IPC call is a socket message.
|
#define | IS_NET_TCP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_TCP_FIRST, NET_TCP_LAST) |
| Check if the IPC call is a TCP message.
|
#define | IS_NET_TL_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_TL_FIRST, NET_TL_LAST) |
| Check if the IPC call is a transport layer message.
|
#define | IS_NET_UDP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_IMETHOD(call), NET_UDP_FIRST, NET_UDP_LAST) |
| Check if the IPC call is a UDP message.
|
#define | NET_ARP_FIRST (NET_IP_LAST + 0) |
| First ARP message.
|
#define | NET_ARP_LAST (NET_ARP_FIRST + NET_ARP_COUNT) |
| Last ARP message.
|
#define | NET_COUNT (NET_LAST - NET_FIRST) |
| Number of networking messages.
|
#define | NET_ETH_FIRST (NET_NIL_LAST + 0) |
| First Ethernet message.
|
#define | NET_ETH_LAST (NET_ETH_FIRST + NET_ETH_COUNT) |
| Last Ethernet message.
|
#define | NET_FIRST 2000 |
| First networking message.
|
#define | NET_ICMP_FIRST (NET_ARP_LAST + 0) |
| First ICMP message.
|
#define | NET_ICMP_LAST (NET_ICMP_FIRST + NET_ICMP_COUNT) |
| Last ICMP message.
|
#define | NET_IL_FIRST (NET_ETH_LAST + 0) |
| First inter-network message.
|
#define | NET_IL_LAST (NET_IL_FIRST + NET_IL_COUNT) |
| Last inter-network message.
|
#define | NET_IP_FIRST (NET_IL_LAST + 0) |
| First IP message.
|
#define | NET_IP_LAST (NET_IP_FIRST + NET_IP_COUNT) |
| Last IP message.
|
#define | NET_LAST NET_PACKET_LAST |
| Last networking message.
|
#define | NET_NET_FIRST (NET_NETIF_LAST + 0) |
| First general networking message.
|
#define | NET_NET_LAST (NET_NET_FIRST + NET_NET_COUNT) |
| Last general networking message.
|
#define | NET_NETIF_FIRST NET_FIRST |
| First network interface layer message.
|
#define | NET_NETIF_LAST (NET_NETIF_FIRST + NET_NETIF_COUNT) |
| Last network interface layer message.
|
#define | NET_NIL_FIRST (NET_NET_LAST + 0) |
| First network interface layer message.
|
#define | NET_NIL_LAST (NET_NIL_FIRST + NET_NIL_COUNT) |
| Last network interface layer message.
|
#define | NET_PACKET_FIRST (NET_SOCKET_LAST + 0) |
| First packet management system message.
|
#define | NET_PACKET_LAST (NET_PACKET_FIRST + NET_PACKET_COUNT) |
| Last packet management system message.
|
#define | NET_SOCKET_FIRST (NET_TCP_LAST + 0) |
| First socket message.
|
#define | NET_SOCKET_LAST (NET_SOCKET_FIRST + NET_SOCKET_COUNT) |
| Last socket message.
|
#define | NET_TCP_FIRST (NET_UDP_LAST + 0) |
| First TCP message.
|
#define | NET_TCP_LAST (NET_TCP_FIRST + NET_TCP_COUNT) |
| Last TCP message.
|
#define | NET_TL_FIRST (NET_ICMP_LAST + 0) |
| First ICMP message.
|
#define | NET_TL_LAST (NET_TL_FIRST + NET_TL_COUNT) |
| Last ICMP message.
|
#define | NET_UDP_FIRST (NET_TL_LAST + 0) |
| First UDP message.
|
#define | NET_UDP_LAST (NET_UDP_FIRST + NET_UDP_COUNT) |
| Last UDP message.
|
Networking message counts |
#define | NET_ARP_COUNT 5 |
| Number of ARP messages.
|
#define | NET_ETH_COUNT 0 |
| Number of Ethernet messages.
|
#define | NET_ICMP_COUNT 6 |
| Number of ICMP messages.
|
#define | NET_IL_COUNT 6 |
| Number of inter-network messages.
|
#define | NET_IP_COUNT 4 |
| Number of IP messages.
|
#define | NET_NET_COUNT 3 |
| Number of general networking messages.
|
#define | NET_NETIF_COUNT 6 |
| Number of network interface driver messages.
|
#define | NET_NIL_COUNT 7 |
| Number of network interface layer messages.
|
#define | NET_PACKET_COUNT 5 |
| Number of packet management system messages.
|
#define | NET_SOCKET_COUNT 14 |
| Number of socket messages.
|
#define | NET_TCP_COUNT 0 |
| Number of TCP messages.
|
#define | NET_TL_COUNT 1 |
| Number of transport layer messages.
|
#define | NET_UDP_COUNT 0 |
| Number of UDP messages.
|
Defines |
#define | FS_NAME_MAXLEN 20 |
#define | ipc_answer_0(callid, retval) ipc_answer_fast((callid), (retval), 0, 0, 0, 0) |
#define | ipc_answer_1(callid, retval, arg1) ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0) |
#define | ipc_answer_2(callid, retval, arg1, arg2) ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0) |
#define | ipc_answer_3(callid, retval, arg1, arg2, arg3) ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0) |
#define | ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4)) |
#define | ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5)) |
#define | ipc_call_async_0(phoneid, method, private, callback, can_preempt) |
#define | ipc_call_async_1(phoneid, method, arg1, private, callback, can_preempt) |
#define | ipc_call_async_2(phoneid, method, arg1, arg2, private, callback, can_preempt) |
#define | ipc_call_async_3(phoneid, method, arg1, arg2, arg3, private, callback, can_preempt) |
#define | ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, private, callback, can_preempt) |
#define | ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, private, callback, can_preempt) |
#define | ipc_call_sync_0_0(phoneid, method) ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0) |
#define | ipc_call_sync_0_1(phoneid, method, res1) ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0) |
#define | ipc_call_sync_0_2(phoneid, method, res1, res2) ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0) |
#define | ipc_call_sync_0_3(phoneid, method, res1, res2, res3) |
#define | ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) |
#define | ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) |
#define | ipc_call_sync_1_0(phoneid, method, arg1) ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0) |
#define | ipc_call_sync_1_1(phoneid, method, arg1, res1) ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0) |
#define | ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) |
#define | ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) |
#define | ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) |
#define | ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, res5) |
#define | ipc_call_sync_2_0(phoneid, method, arg1, arg2) |
#define | ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) |
#define | ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) |
#define | ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) |
#define | ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, res4) |
#define | ipc_call_sync_2_5(phoneid, method, arg1, arg2, res1, res2, res3, res4, res5) |
#define | ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) |
#define | ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) |
#define | ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) |
#define | ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, res3) |
#define | ipc_call_sync_3_4(phoneid, method, arg1, arg2, arg3, res1, res2, res3, res4) |
#define | ipc_call_sync_3_5(phoneid, method, arg1, arg2, arg3, res1, res2, res3, res4, res5) |
#define | ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) |
#define | ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) |
#define | ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) |
#define | ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, res3) |
#define | ipc_call_sync_4_4(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, res3, res4) |
#define | ipc_call_sync_4_5(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, res3, res4, res5) |
#define | ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) |
#define | ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) |
#define | ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, res2) |
#define | ipc_call_sync_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, res2, res3) |
#define | ipc_call_sync_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, res2, res3, res4) |
#define | ipc_call_sync_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, res2, res3, res4, res5) |
#define | IPC_FLAG_BLOCKING 0x01 |
#define | ipc_share_in_start_0_0(phoneid, dst, size) ipc_share_in_start((phoneid), (dst), (size), 0, NULL) |
#define | ipc_share_in_start_0_1(phoneid, dst, size, flags) ipc_share_in_start((phoneid), (dst), (size), 0, (flags)) |
#define | ipc_share_in_start_1_0(phoneid, dst, size, arg) ipc_share_in_start((phoneid), (dst), (size), (arg), NULL) |
#define | ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) ipc_share_in_start((phoneid), (dst), (size), (arg), (flags)) |
#define | ipc_wait_for_call(data) ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT); |
#define | IS_IN_INTERVAL(item, first_inclusive, last_exclusive) (((item) >= (first_inclusive)) && ((item) < (last_exclusive))) |
| Return a value indicating whether the value is in the interval.
|
#define | L_CREATE 32 |
| L_CREATE is used for creating both regular files and directories.
|
#define | L_DIRECTORY 2 |
| Lookup will succeed only if the object is a directory.
|
#define | L_EXCLUSIVE 16 |
| When used with L_CREATE, L_EXCLUSIVE will cause the lookup to fail if the object already exists.
|
#define | L_FILE 1 |
| Lookup will succeed only if the object is a regular file.
|
#define | L_LINK 64 |
| L_LINK is used for linking to an already existing nodes.
|
#define | L_MP 8 |
| Lookup will succeed only if the object is a mount point.
|
#define | L_NONE 0 |
| No lookup flags used.
|
#define | L_OPEN 256 |
| L_OPEN is used to indicate that the lookup operation is a part of VFS_IN_OPEN call from the client.
|
#define | L_ROOT 4 |
| Lookup will succeed only if the object is a root directory.
|
#define | L_UNLINK 128 |
| L_UNLINK is used to remove leaves from the file system namespace.
|
#define | MAX_PATH_LEN (64 * 1024) |
#define | PLB_SIZE (2 * MAX_PATH_LEN) |
Typedefs |
typedef int16_t | fs_handle_t |
typedef uint32_t | fs_index_t |
typedef void(*) | ipc_async_callback_t (void *, int, ipc_call_t *) |
typedef sysarg_t | ipc_callid_t |
Enumerations |
enum | |
enum | adb_notif_t |
enum | adb_request_t |
enum | bd_request_t |
enum | char_notif_t |
enum | char_request_t |
enum | clipboard_request_t |
enum | clipboard_tag_t |
enum | console_request_t |
enum | fb_request_t |
enum | irc_request_t |
enum | loader_request_t |
enum | ns_request_t |
enum | services_t |
enum | vfs_in_request_t |
enum | vfs_out_request_t |
Functions |
static void | dispatch_queued_calls (void) |
| Try to dispatch queued calls from the async queue.
|
static void | handle_answer (ipc_callid_t callid, ipc_call_t *data) |
| Handle received answer.
|
sysarg_t | ipc_answer_fast (ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4) |
| Answer received call (fast version).
|
sysarg_t | ipc_answer_slow (ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5) |
| Answer received call (entire payload).
|
void | ipc_call_async_fast (int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, void *private, ipc_async_callback_t callback, bool can_preempt) |
| Fast asynchronous call.
|
static ipc_callid_t | ipc_call_async_internal (int phoneid, ipc_call_t *data) |
| Send asynchronous message via syscall.
|
void | ipc_call_async_slow (int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, void *private, ipc_async_callback_t callback, bool can_preempt) |
| Asynchronous call transmitting the entire payload.
|
int | ipc_call_sync_fast (int phoneid, sysarg_t method, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *result1, sysarg_t *result2, sysarg_t *result3, sysarg_t *result4, sysarg_t *result5) |
| Fast synchronous call.
|
int | ipc_call_sync_slow (int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *result1, sysarg_t *result2, sysarg_t *result3, sysarg_t *result4, sysarg_t *result5) |
| Synchronous call transmitting 5 arguments of payload.
|
int | ipc_connect_kbox (task_id_t id) |
| Connect to a task specified by id.
|
int | ipc_connect_me_to (int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3) |
| Request new connection.
|
int | ipc_connect_me_to_blocking (int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3) |
| Request new connection (blocking).
|
int | ipc_connect_to_me (int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *taskhash, sysarg_t *phonehash) |
| Request callback connection.
|
int | ipc_data_read_finalize (ipc_callid_t callid, const void *src, size_t size) |
| Wrapper for answering the IPC_M_DATA_READ calls.
|
int | ipc_data_read_start (int phoneid, void *dst, size_t size) |
| Wrapper for IPC_M_DATA_READ calls.
|
int | ipc_data_write_finalize (ipc_callid_t callid, void *dst, size_t size) |
| Wrapper for answering the IPC_M_DATA_WRITE calls.
|
int | ipc_data_write_start (int phoneid, const void *src, size_t size) |
| Wrapper for IPC_M_DATA_WRITE calls.
|
static void | ipc_finish_async (ipc_callid_t callid, int phoneid, async_call_t *call, bool can_preempt) |
| Epilog for ipc_call_async_*() functions.
|
int | ipc_forward_fast (ipc_callid_t callid, int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, unsigned int mode) |
| Forward a received call to another destination.
|
int | ipc_forward_slow (ipc_callid_t callid, int phoneid, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, unsigned int mode) |
int | ipc_hangup (int phoneid) |
| Hang up a phone.
|
void | ipc_poke (void) |
| Interrupt one thread of this task from waiting for IPC.
|
static async_call_t * | ipc_prepare_async (void *private, ipc_async_callback_t callback) |
| Prolog for ipc_call_async_*() functions.
|
int | ipc_share_in_finalize (ipc_callid_t callid, void *src, unsigned int flags) |
| Wrapper for answering the IPC_M_SHARE_IN calls.
|
int | ipc_share_in_start (int phoneid, void *dst, size_t size, sysarg_t arg, unsigned int *flags) |
| Wrapper for IPC_M_SHARE_IN calls.
|
int | ipc_share_out_finalize (ipc_callid_t callid, void *dst) |
| Wrapper for answering the IPC_M_SHARE_OUT calls.
|
int | ipc_share_out_start (int phoneid, void *src, unsigned int flags) |
| Wrapper for IPC_M_SHARE_OUT calls.
|
ipc_callid_t | ipc_trywait_for_call (ipc_call_t *call) |
| Check if there is an IPC call waiting to be picked up.
|
ipc_callid_t | ipc_wait_cycle (ipc_call_t *call, sysarg_t usec, unsigned int flags) |
| Wait for first IPC call to come.
|
ipc_callid_t | ipc_wait_for_call_timeout (ipc_call_t *call, sysarg_t usec) |
| Wait for first IPC call to come.
|
| LIST_INITIALIZE (queued_calls) |
| List of asynchronous calls that were not accepted by kernel.
|
int | service_connect (sysarg_t, sysarg_t, sysarg_t) |
int | service_connect_blocking (sysarg_t, sysarg_t, sysarg_t) |
int | service_register (sysarg_t) |
Variables |
atomic_t | async_futex |
static atomic_t | ipc_futex = FUTEX_INITIALIZER |