2002-10-05 21:07:03 +04:00
|
|
|
/*
|
|
|
|
** Copyright 2002, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
|
|
|
** Distributed under the terms of the OpenBeOS License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <OS.h>
|
|
|
|
#include "syscalls.h"
|
|
|
|
|
|
|
|
|
|
|
|
port_id
|
|
|
|
create_port(int32 capacity, const char *name)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_create_port(capacity, name);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
port_id
|
|
|
|
find_port(const char *name)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_find_port(name);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
write_port(port_id port, int32 code, const void *buffer, size_t bufferSize)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_write_port_etc(port, code, buffer, bufferSize, 0, 0);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
read_port(port_id port, int32 *code, void *buffer, size_t bufferSize)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_read_port_etc(port, code, buffer, bufferSize, 0, 0);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
write_port_etc(port_id port, int32 code, const void *buffer, size_t bufferSize,
|
|
|
|
uint32 flags, bigtime_t timeout)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_write_port_etc(port, code, buffer, bufferSize, flags, timeout);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
read_port_etc(port_id port, int32 *code, void *buffer, size_t bufferSize,
|
|
|
|
uint32 flags, bigtime_t timeout)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_read_port_etc(port, code, buffer, bufferSize, flags, timeout);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ssize_t
|
|
|
|
port_buffer_size(port_id port)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_port_buffer_size_etc(port, 0, 0);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ssize_t
|
|
|
|
port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_port_buffer_size_etc(port, flags, timeout);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ssize_t
|
|
|
|
port_count(port_id port)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_port_count(port);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
set_port_owner(port_id port, team_id team)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_set_port_owner(port, team);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
close_port(port_id port)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_close_port(port);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
delete_port(port_id port)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_delete_port(port);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
_get_next_port_info(team_id team, int32 *cookie, port_info *info, size_t size)
|
|
|
|
{
|
|
|
|
// size is not yet used, but may, if port_info changes
|
|
|
|
(void)size;
|
|
|
|
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_get_next_port_info(team, cookie, info);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
|
|
|
_get_port_info(port_id port, port_info *info, size_t size)
|
|
|
|
{
|
2004-08-29 00:45:00 +04:00
|
|
|
return _kern_get_port_info(port, info);
|
2002-10-05 21:07:03 +04:00
|
|
|
}
|
|
|
|
|