/kernel/trunk/generic/include/syscall/syscall.h |
---|
40,7 → 40,6 |
SYS_IPC_ANSWER_FAST, |
SYS_IPC_ANSWER, |
SYS_IPC_WAIT, |
SYS_IPC_CONNECT_TO_ME, |
SYSCALL_END |
} syscall_t; |
/kernel/trunk/generic/include/ipc/sysipc.h |
---|
File deleted |
/kernel/trunk/generic/include/ipc/ipc.h |
---|
68,37 → 68,6 |
/* Well known phone descriptors */ |
#define PHONE_NS 0 |
/* System-specific methods - only through special syscalls |
* These methods have special behaviour |
*/ |
#define IPC_M_IAMCONNECTING 0 |
/** Protocol for CONNECT - TO - ME |
* |
* Calling process asks the callee to create a callback connection, |
* so that it can start initiating new messages. |
* |
* The protocol for negotiating is as follows: |
* - sys_connecttome - sends a message IPC_M_CONNECTTOME |
* - sys_wait_for_call - upon receipt tries to allocate new phone |
* - if it fails, responds with ELIMIT |
* - passes call to userspace. If userspace |
* responds with error, phone is deallocated and |
* error is sent back to caller. Otherwise |
* the call is accepted and the response is sent back. |
* - the allocated phoneid is passed to userspace as |
* ARG3 of the call. |
* - the caller obtains taskid of the called thread |
*/ |
#define IPC_M_CONNECTTOME 1 |
#define IPC_M_CONNECTMETO 2 |
/* Well-known methods */ |
#define IPC_M_FIRST_USER 512 |
#define IPC_M_PING 512 |
/* User methods */ |
#define FIRST_USER_METHOD 1024 |
#ifdef KERNEL |
#include <synch/mutex.h> |
107,8 → 76,8 |
#define IPC_MAX_PHONES 16 |
typedef struct answerbox answerbox_t; |
typedef __native ipc_data_t[IPC_CALL_LEN]; |
typedef struct { |
link_t list; |
115,14 → 84,12 |
answerbox_t *callerbox; |
int flags; |
task_t *sender; |
ipc_data_t data; |
__native data[IPC_CALL_LEN]; |
} call_t; |
struct answerbox { |
SPINLOCK_DECLARE(lock); |
task_t *task; |
mutex_t mutex; |
condvar_t cv; |
/kernel/trunk/generic/include/ipc/ns.h |
---|
0,0 → 1,46 |
/* |
* Copyright (C) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef __NS_H_ |
#define __NS_H_ |
/* NameService methods */ |
/** Ping name service */ |
#define NS_PING 1 |
#ifdef KERNEL |
#include <ipc/ipc.h> |
extern void ns_start(void); |
#endif |
#endif |
/kernel/trunk/generic/include/errno.h |
---|
33,7 → 33,5 |
#define ENOENT -1 /* No such entry */ |
#define ENOMEM -2 /* Not enough memory */ |
#define ELIMIT -3 /* Limit exceeded */ |
#define EREFUSED -4 /* Connection refused */ |
#endif |