Improved headers, updated license, made C++ safe.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10909 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2005, Haiku Inc. All Rights Reserved.
|
||||||
** Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the MIT license.
|
||||||
*/
|
*
|
||||||
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
|
* Distributed under the terms of the NewOS License.
|
||||||
|
*/
|
||||||
#ifndef _KERNEL_ELF_H
|
#ifndef _KERNEL_ELF_H
|
||||||
#define _KERNEL_ELF_H
|
#define _KERNEL_ELF_H
|
||||||
|
|
||||||
@@ -9,6 +12,8 @@
|
|||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
|
||||||
|
struct kernel_args;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -22,7 +27,7 @@ status_t unload_kernel_add_on(image_id id);
|
|||||||
|
|
||||||
status_t elf_lookup_symbol_address(addr_t address, addr_t *_baseAddress,
|
status_t elf_lookup_symbol_address(addr_t address, addr_t *_baseAddress,
|
||||||
const char **_symbolName, const char **_imageName, bool *_exactMatch);
|
const char **_symbolName, const char **_imageName, bool *_exactMatch);
|
||||||
status_t elf_init(kernel_args *args);
|
status_t elf_init(struct kernel_args *args);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
/* ports.h
|
/*
|
||||||
*
|
* Copyright 2005, Haiku Inc. All Rights Reserved.
|
||||||
* Definitions here are for kernel use only. For the actual
|
* Distributed under the terms of the MIT license.
|
||||||
* definitions of port functions, please look at OS.h
|
|
||||||
*/
|
*/
|
||||||
#ifndef _KERNEL_PORT_H
|
#ifndef _KERNEL_PORT_H
|
||||||
#define _KERNEL_PORT_H
|
#define _KERNEL_PORT_H
|
||||||
|
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
|
|
||||||
|
struct kernel_args;
|
||||||
|
|
||||||
|
|
||||||
#define PORT_FLAG_USE_USER_MEMCPY 0x80000000
|
#define PORT_FLAG_USE_USER_MEMCPY 0x80000000
|
||||||
|
|
||||||
status_t port_init(kernel_args *ka);
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
status_t port_init(struct kernel_args *args);
|
||||||
int delete_owned_ports(team_id owner);
|
int delete_owned_ports(team_id owner);
|
||||||
int32 port_max_ports(void);
|
int32 port_max_ports(void);
|
||||||
int32 port_used_ports(void);
|
int32 port_used_ports(void);
|
||||||
@@ -18,31 +24,27 @@ int32 port_used_ports(void);
|
|||||||
// temp: test
|
// temp: test
|
||||||
void port_test(void);
|
void port_test(void);
|
||||||
|
|
||||||
// user-level API
|
// user syscalls
|
||||||
port_id _user_create_port(int32 queue_length, const char *name);
|
port_id _user_create_port(int32 queue_length, const char *name);
|
||||||
status_t _user_close_port(port_id id);
|
status_t _user_close_port(port_id id);
|
||||||
status_t _user_delete_port(port_id id);
|
status_t _user_delete_port(port_id id);
|
||||||
port_id _user_find_port(const char *port_name);
|
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_port_info(port_id id, struct port_info *info);
|
||||||
status_t _user_get_next_port_info(team_id team,
|
status_t _user_get_next_port_info(team_id team, int32 *cookie,
|
||||||
int32 *cookie,
|
|
||||||
struct port_info *info);
|
struct port_info *info);
|
||||||
ssize_t _user_port_buffer_size_etc(port_id port,
|
ssize_t _user_port_buffer_size_etc(port_id port, uint32 flags,
|
||||||
uint32 flags,
|
|
||||||
bigtime_t timeout);
|
bigtime_t timeout);
|
||||||
ssize_t _user_port_count(port_id port);
|
ssize_t _user_port_count(port_id port);
|
||||||
ssize_t _user_read_port_etc(port_id port,
|
ssize_t _user_read_port_etc(port_id port, int32 *msg_code,
|
||||||
int32 *msg_code,
|
void *msg_buffer, size_t buffer_size, uint32 flags,
|
||||||
void *msg_buffer,
|
|
||||||
size_t buffer_size,
|
|
||||||
uint32 flags,
|
|
||||||
bigtime_t timeout);
|
bigtime_t timeout);
|
||||||
status_t _user_set_port_owner(port_id port, team_id team);
|
status_t _user_set_port_owner(port_id port, team_id team);
|
||||||
status_t _user_write_port_etc(port_id port,
|
status_t _user_write_port_etc(port_id port, int32 msg_code,
|
||||||
int32 msg_code,
|
const void *msg_buffer, size_t buffer_size,
|
||||||
const void *msg_buffer,
|
uint32 flags, bigtime_t timeout);
|
||||||
size_t buffer_size,
|
|
||||||
uint32 flags,
|
#ifdef __cplusplus
|
||||||
bigtime_t timeout);
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _KERNEL_PORT_H */
|
#endif /* _KERNEL_PORT_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user