2002-07-09 16:24:59 +04:00
|
|
|
/* ports.h
|
|
|
|
*
|
|
|
|
* Definitions here are for kernel use only. For the actual
|
|
|
|
* definitions of port functions, please look at OS.h
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_PORT_H
|
|
|
|
#define _KERNEL_PORT_H
|
|
|
|
|
|
|
|
#include <thread.h>
|
|
|
|
|
|
|
|
#define PORT_FLAG_USE_USER_MEMCPY 0x80000000
|
|
|
|
|
2002-09-03 06:19:22 +04:00
|
|
|
status_t port_init(kernel_args *ka);
|
2002-08-03 04:41:27 +04:00
|
|
|
int delete_owned_ports(team_id owner);
|
2004-04-22 02:46:35 +04:00
|
|
|
int32 port_max_ports(void);
|
|
|
|
int32 port_used_ports(void);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
// temp: test
|
|
|
|
void port_test(void);
|
|
|
|
|
|
|
|
// user-level API
|
2004-08-29 00:45:00 +04:00
|
|
|
port_id _user_create_port(int32 queue_length, const char *name);
|
|
|
|
status_t _user_close_port(port_id id);
|
|
|
|
status_t _user_delete_port(port_id id);
|
|
|
|
port_id _user_find_port(const char *port_name);
|
|
|
|
status_t _user_get_port_info(port_id id, struct port_info *info);
|
|
|
|
status_t _user_get_next_port_info(team_id team,
|
2002-09-03 06:19:22 +04:00
|
|
|
int32 *cookie,
|
2002-07-09 16:24:59 +04:00
|
|
|
struct port_info *info);
|
2004-08-29 00:45:00 +04:00
|
|
|
ssize_t _user_port_buffer_size_etc(port_id port,
|
2002-07-09 16:24:59 +04:00
|
|
|
uint32 flags,
|
|
|
|
bigtime_t timeout);
|
2004-08-29 00:45:00 +04:00
|
|
|
ssize_t _user_port_count(port_id port);
|
|
|
|
status_t _user_read_port_etc(port_id port,
|
2002-07-09 16:24:59 +04:00
|
|
|
int32 *msg_code,
|
|
|
|
void *msg_buffer,
|
|
|
|
size_t buffer_size,
|
|
|
|
uint32 flags,
|
|
|
|
bigtime_t timeout);
|
2004-08-29 00:45:00 +04:00
|
|
|
status_t _user_set_port_owner(port_id port, team_id team);
|
|
|
|
status_t _user_write_port_etc(port_id port,
|
2002-07-09 16:24:59 +04:00
|
|
|
int32 msg_code,
|
2004-08-29 00:45:00 +04:00
|
|
|
const void *msg_buffer,
|
2002-07-09 16:24:59 +04:00
|
|
|
size_t buffer_size,
|
|
|
|
uint32 flags,
|
|
|
|
bigtime_t timeout);
|
|
|
|
|
2003-09-13 00:48:07 +04:00
|
|
|
#endif /* _KERNEL_PORT_H */
|