Implemented send_data/receive_data/has_data thread syscalls
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@815 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -352,6 +352,10 @@ int suspend_thread(thread_id thread);
|
||||
|
||||
thread_id find_thread(const char *);
|
||||
|
||||
status_t send_data(thread_id thread, int32 code, const void *buffer, size_t buffer_size);
|
||||
status_t receive_data(thread_id *sender, void *buffer, size_t buffer_size);
|
||||
bool has_data(thread_id thread);
|
||||
|
||||
status_t snooze(bigtime_t);
|
||||
|
||||
status_t _get_thread_info(thread_id id, thread_info *info, size_t size);
|
||||
|
||||
@@ -18,6 +18,7 @@ extern "C" {
|
||||
|
||||
#include <stage2.h>
|
||||
#include <ktypes.h>
|
||||
#include <cbuf.h>
|
||||
#include <vm.h>
|
||||
#include <smp.h>
|
||||
#include <arch/thread_struct.h>
|
||||
@@ -108,6 +109,14 @@ struct thread {
|
||||
int sem_deleted_retcode;
|
||||
int sem_errcode;
|
||||
int sem_flags;
|
||||
struct {
|
||||
sem_id write_sem;
|
||||
sem_id read_sem;
|
||||
thread_id sender;
|
||||
int32 code;
|
||||
size_t size;
|
||||
cbuf *buffer;
|
||||
} msg;
|
||||
addr fault_handler;
|
||||
addr entry;
|
||||
void *args;
|
||||
|
||||
@@ -102,6 +102,9 @@ enum {
|
||||
SYSCALL_GET_NEXT_TEAM_INFO,
|
||||
SYSCALL_CREATE_LINK,
|
||||
SYSCALL_REMOVE_DIR,
|
||||
SYSCALL_SEND_DATA,
|
||||
SYSCALL_RECEIVE_DATA,
|
||||
SYSCALL_HAS_DATA,
|
||||
};
|
||||
|
||||
int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret);
|
||||
|
||||
@@ -83,6 +83,9 @@ int user_team_wait_on_team(team_id id, int *uretcode);
|
||||
thread_id user_thread_create_user_thread(addr, team_id, const char*,
|
||||
int, void *);
|
||||
|
||||
status_t user_send_data(thread_id thread, int32 code, const void *buffer, size_t buffer_size);
|
||||
status_t user_receive_data(thread_id *sender, void *buffer, size_t buffer_size);
|
||||
|
||||
status_t user_get_thread_info(thread_id id, thread_info *info);
|
||||
status_t user_get_next_thread_info(team_id team, int32 *cookie, thread_info *info);
|
||||
status_t user_get_team_info(team_id id, team_info *info);
|
||||
|
||||
Reference in New Issue
Block a user