fixed the way accept() works in regards to the cookie pointer. It is no longer visible to userspace, we pass the fd instead. Also renamed kernel's shutdown() to system_shutdown as it collides with Posix's shutdown().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21223 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-05-23 19:56:40 +00:00
parent be2f6ac347
commit 77bf99deb0
9 changed files with 61 additions and 58 deletions
+2
View File
@@ -86,6 +86,8 @@ extern void fd_set_close_on_exec(struct io_context *context, int fd, bool closeF
static struct io_context *get_current_io_context(bool kernel);
extern status_t user_fd_kernel_ioctl(int fd, ulong op, void *buffer, size_t length);
/* The prototypes of the (sys|user)_ functions are currently defined in vfs.h */
+1 -1
View File
@@ -59,7 +59,7 @@ extern bool kernel_startup;
extern "C" {
#endif
status_t shutdown(bool reboot);
status_t system_shutdown(bool reboot);
status_t _user_shutdown(bool reboot);
#ifdef __cplusplus
+6 -6
View File
@@ -23,7 +23,7 @@ enum {
// ops not acting on an existing socket
NET_STACK_SOCKET = NET_STACK_IOCTL_BASE, // socket_args *
NET_STACK_GET_COOKIE, // void **
NET_STACK_GET_COOKIE, // void **
NET_STACK_CONTROL_NET_MODULE, // control_net_module_args *
NET_STACK_GET_NEXT_STAT, // get_next_stat_args *
@@ -72,13 +72,13 @@ struct socket_args { // used by NET_STACK_SOCKET
};
struct socketpair_args { // used by NET_STACK_SOCKETPAIR
void *cookie;
int second_socket;
};
struct accept_args { // used by NET_STACK_ACCEPT
void *cookie;
struct sockaddr *address;
socklen_t address_length;
struct accept_args { // used by NET_STACK_ACCEPT
int accept_socket;
struct sockaddr *address;
socklen_t address_length;
};
struct get_next_stat_args { // used by NET_STACK_GET_NEXT_STAT