1 /* ports.h 2 * 3 * Definitions here are for kernel use only. For the actual 4 * definitions of port functions, please look at OS.h 5 */ 6 #ifndef _KERNEL_PORT_H 7 #define _KERNEL_PORT_H 8 9 #include <thread.h> 10 11 #define PORT_FLAG_USE_USER_MEMCPY 0x80000000 12 13 status_t port_init(kernel_args *ka); 14 int delete_owned_ports(team_id owner); 15 16 // temp: test 17 void port_test(void); 18 19 // user-level API 20 port_id user_create_port(int32 queue_length, const char *name); 21 status_t user_close_port(port_id id); 22 status_t user_delete_port(port_id id); 23 port_id user_find_port(const char *port_name); 24 status_t user_get_port_info(port_id id, struct port_info *info); 25 status_t user_get_next_port_info(team_id team, 26 int32 *cookie, 27 struct port_info *info); 28 ssize_t user_port_buffer_size_etc(port_id port, 29 uint32 flags, 30 bigtime_t timeout); 31 ssize_t user_port_count(port_id port); 32 status_t user_read_port_etc(port_id port, 33 int32 *msg_code, 34 void *msg_buffer, 35 size_t buffer_size, 36 uint32 flags, 37 bigtime_t timeout); 38 status_t user_set_port_owner(port_id port, team_id team); 39 status_t user_write_port_etc(port_id port, 40 int32 msg_code, 41 void *msg_buffer, 42 size_t buffer_size, 43 uint32 flags, 44 bigtime_t timeout); 45 46 #endif /* _KERNEL_PORT_H */ 47