- Timestamp:
- 2018-01-30T03:20:45Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5a6cc679
- Parents:
- 8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- abi/include
- Files:
-
- 1 added
- 4 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
abi/include/_bits/errno.h
r8bfb163 r132ab5d1 1 1 /* 2 * Copyright (c) 201 0 Lenka Trochtova2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libdrv 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBDRV_REMOTE_CHAR_DEV_H_36 #define LIBDRV_REMOTE_CHAR_DEV_H_39 #ifndef _BITS_ERRNO_H_ 40 #define _BITS_ERRNO_H_ 37 41 38 extern remote_iface_t remote_char_dev_iface; 42 #ifdef __OPAQUE_ERRNO__ 43 #include <_bits/opaque_handle.h> 44 45 opaque_handle(errno_t); 46 typedef errno_t sys_errno_t; 47 #define __errno_t(val) ((errno_t) val) 48 49 #else 50 51 #include <_bits/native.h> 52 53 /** 54 * The type of <errno.h> constants. Normally, this is an alias for `int`, 55 * but we support an alternative definition that allows us to verify 56 * integrity of error handling without using external tools. 57 */ 58 typedef int errno_t; 59 60 /** 61 * Same as `errno_t`, except represented as `sysarg_t`. Used in kernel in 62 * places where error number is always passed, but the type must be `sysarg_t`. 63 */ 64 typedef sysarg_t sys_errno_t; 65 66 /** 67 * A C++-style "cast" to `errno_t`. 68 * Used in <abi/errno.h> to define error constants. Normally, it doesn't do 69 * anything at all. 70 */ 71 #define __errno_t(val) val 39 72 40 73 #endif 41 74 42 /** 43 * @} 44 */ 75 #endif -
abi/include/_bits/opaque_handle.h
r8bfb163 r132ab5d1 1 1 /* 2 * Copyright (c) 201 3 Martin Sucha2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup http 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ 32 /**33 * @file34 */35 36 36 #ifndef HTTP_ERRNO_H_37 #define HTTP_ERRNO_H_37 #ifndef _BITS_OPAQUE_HANDLE_H_ 38 #define _BITS_OPAQUE_HANDLE_H_ 38 39 39 #include <errno.h> 40 41 #define HTTP_EMULTIPLE_HEADERS -20001 42 #define HTTP_EMISSING_HEADER -20002 43 #define HTTP_EPARSE -20003 40 #define opaque_handle(__name) typedef struct __opaque_##__name *__name 44 41 45 42 #endif -
abi/include/abi/cap.h
r8bfb163 r132ab5d1 1 1 /* 2 * Copyright (c) 20 08 Pavel Rimsky2 * Copyright (c) 2017 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup generic 30 * @{ 31 */ 29 32 /** @file 30 33 */ 31 34 32 #ifndef OUTPUT_PORT_NIAGARA_H_33 #define OUTPUT_PORT_NIAGARA_H_35 #ifndef ABI_CAP_H_ 36 #define ABI_CAP_H_ 34 37 35 extern int niagara_init(void); 38 #define CAP_NIL 0 39 40 typedef int cap_handle_t; 36 41 37 42 #endif -
abi/include/abi/errno.h
r8bfb163 r132ab5d1 1 /* 2 * Copyright (c) 2005 Martin Decky 3 * All rights reserved. 1 /* Generated file. Edit errno.in instead. */ 2 #define EOK __errno_t( 0) 3 #define ENOENT __errno_t( 1) 4 #define ENOMEM __errno_t( 2) 5 #define ELIMIT __errno_t( 3) 6 #define EREFUSED __errno_t( 4) 7 #define EFORWARD __errno_t( 5) 8 #define EPERM __errno_t( 6) 9 #define EHANGUP __errno_t( 7) 10 #define EPARTY __errno_t( 8) 11 #define EEXIST __errno_t( 9) 12 #define EBADMEM __errno_t( 10) 13 #define ENOTSUP __errno_t( 11) 14 #define EADDRNOTAVAIL __errno_t( 12) 15 #define ETIMEOUT __errno_t( 13) 16 #define EINVAL __errno_t( 14) 17 #define EBUSY __errno_t( 15) 18 #define EOVERFLOW __errno_t( 16) 19 #define EINTR __errno_t( 17) 20 #define EMFILE __errno_t( 18) 21 #define ENAMETOOLONG __errno_t( 19) 22 #define EISDIR __errno_t( 20) 23 #define ENOTDIR __errno_t( 21) 24 #define ENOSPC __errno_t( 22) 25 #define ENOTEMPTY __errno_t( 23) 26 #define EBADF __errno_t( 24) 27 #define EDOM __errno_t( 25) 28 #define ERANGE __errno_t( 26) 29 #define EXDEV __errno_t( 27) 30 #define EIO __errno_t( 28) 31 #define EMLINK __errno_t( 29) 32 #define ENXIO __errno_t( 30) 33 #define ENOFS __errno_t( 31) 34 #define EBADCHECKSUM __errno_t( 32) 35 #define ESTALL __errno_t( 33) 36 #define EEMPTY __errno_t( 34) 37 #define ENAK __errno_t( 35) 38 #define EAGAIN __errno_t( 36) 39 40 /* libhttp error codes. Defining them here is a temporary hack. */ 41 42 #define HTTP_EMULTIPLE_HEADERS __errno_t( 50) 43 #define HTTP_EMISSING_HEADER __errno_t( 51) 44 #define HTTP_EPARSE __errno_t( 52) 45 46 /* libext4 error codes. Same as above. */ 47 48 #define EXT4_ERR_BAD_DX_DIR __errno_t( 60) 49 50 51 /* POSIX error codes + whatever nonstandard names crop up in third-party 52 * software. These are not used in HelenOS code, but are defined here in 53 * order to avoid nasty hacks in libposix. 4 54 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 55 * If you decide to use one of these in native HelenOS code, 56 * move it up to the first group. 27 57 */ 28 58 29 /** @addtogroup generic 30 * @{ 31 */ 32 /** @file 33 */ 59 /* COMPAT_START -- do not remove or edit this comment */ 34 60 35 #ifndef ABI_ERRNO_H_ 36 #define ABI_ERRNO_H_ 37 38 /** 39 * Values in the range [-1, -255] are kernel error codes, 40 * values in the range [-256, -512] are user error codes. 41 */ 42 43 #define EOK 0 /* No error */ 44 #define ENOENT -1 /* No such entry */ 45 #define ENOMEM -2 /* Not enough memory */ 46 #define ELIMIT -3 /* Limit exceeded */ 47 #define EREFUSED -4 /* Connection refused */ 48 #define EFORWARD -5 /* Forward error */ 49 #define EPERM -6 /* Permission denied */ 50 51 /* 52 * Answerbox closed connection, call 53 * sys_ipc_hangup() to close the connection. 54 * Used by answerbox to close the connection. 55 */ 56 #define EHANGUP -7 57 58 /* 59 * The other party encountered an error when 60 * receiving the call. 61 */ 62 #define EPARTY -8 63 64 #define EEXIST -9 /* Entry already exists */ 65 #define EBADMEM -10 /* Bad memory pointer */ 66 #define ENOTSUP -11 /* Not supported */ 67 #define EADDRNOTAVAIL -12 /* Address not available. */ 68 #define ETIMEOUT -13 /* Timeout expired */ 69 #define EINVAL -14 /* Invalid value */ 70 #define EBUSY -15 /* Resource is busy */ 71 #define EOVERFLOW -16 /* The result does not fit its size. */ 72 #define EINTR -17 /* Operation was interrupted. */ 73 74 #endif 75 76 /** @} 77 */ 61 #define E2BIG __errno_t( 101) 62 #define EACCES __errno_t( 102) 63 #define EADDRINUSE __errno_t( 103) 64 #define EAFNOSUPPORT __errno_t( 105) 65 #define EALREADY __errno_t( 107) 66 #define EBADMSG __errno_t( 109) 67 #define ECANCELED __errno_t( 111) 68 #define ECHILD __errno_t( 112) 69 #define ECONNABORTED __errno_t( 113) 70 #define ECONNREFUSED __errno_t( 114) 71 #define ECONNRESET __errno_t( 115) 72 #define EDEADLK __errno_t( 116) 73 #define EDESTADDRREQ __errno_t( 117) 74 #define EDQUOT __errno_t( 119) 75 #define EFAULT __errno_t( 121) 76 #define EFBIG __errno_t( 122) 77 #define EHOSTUNREACH __errno_t( 123) 78 #define EIDRM __errno_t( 124) 79 #define EILSEQ __errno_t( 125) 80 #define EINPROGRESS __errno_t( 126) 81 #define EISCONN __errno_t( 130) 82 #define ELOOP __errno_t( 132) 83 #define EMSGSIZE __errno_t( 135) 84 #define EMULTIHOP __errno_t( 136) 85 #define ENETDOWN __errno_t( 138) 86 #define ENETRESET __errno_t( 139) 87 #define ENETUNREACH __errno_t( 140) 88 #define ENFILE __errno_t( 141) 89 #define ENOBUFS __errno_t( 142) 90 #define ENODATA __errno_t( 143) 91 #define ENODEV __errno_t( 144) 92 #define ENOEXEC __errno_t( 146) 93 #define ENOLCK __errno_t( 147) 94 #define ENOLINK __errno_t( 148) 95 #define ENOMSG __errno_t( 150) 96 #define ENOPROTOOPT __errno_t( 151) 97 #define ENOSR __errno_t( 153) 98 #define ENOSTR __errno_t( 154) 99 #define ENOSYS __errno_t( 155) 100 #define ENOTCONN __errno_t( 156) 101 #define ENOTRECOVERABLE __errno_t( 159) 102 #define ENOTSOCK __errno_t( 160) 103 #define ENOTTY __errno_t( 162) 104 #define EOPNOTSUPP __errno_t( 164) 105 #define EOWNERDEAD __errno_t( 166) 106 #define EPIPE __errno_t( 168) 107 #define EPROTO __errno_t( 169) 108 #define EPROTONOSUPPORT __errno_t( 170) 109 #define EPROTOTYPE __errno_t( 171) 110 #define EROFS __errno_t( 173) 111 #define ESPIPE __errno_t( 174) 112 #define ESRCH __errno_t( 175) 113 #define ESTALE __errno_t( 176) 114 #define ETIME __errno_t( 177) 115 #define ETIMEDOUT __errno_t( 178) 116 #define ETXTBSY __errno_t( 179) 117 #define EWOULDBLOCK __errno_t( 180) -
abi/include/abi/ipc/ipc.h
r8bfb163 r132ab5d1 38 38 /** Length of data being transferred with IPC call 39 39 * 40 * The uspace may not be able to utilize full length40 * The uspace may not be able to utilize the full length 41 41 * 42 42 */ … … 49 49 50 50 /** This is answer to a call */ 51 #define IPC_CALL_ANSWERED (1 << 0)51 #define IPC_CALL_ANSWERED (1 << 0) 52 52 53 53 /** Answer will not be passed to userspace, will be discarded */ … … 55 55 56 56 /** Call was forwarded */ 57 #define IPC_CALL_FORWARDED (1 << 2)57 #define IPC_CALL_FORWARDED (1 << 2) 58 58 59 59 /** Interrupt notification */ 60 #define IPC_CALL_NOTIF (1 << 3) 60 #define IPC_CALL_NOTIF (1 << 3) 61 62 /** The call was automatically answered by the kernel due to error */ 63 #define IPC_CALL_AUTO_REPLY (1 << 4) 61 64 62 65 /** … … 66 69 #define DATA_XFER_LIMIT (64 * 1024) 67 70 68 69 /** Bits used in call hashes.70 *71 * The addresses are aligned at least to 4 that is why we can use the 2 least72 * significant bits of the call address.73 *74 */75 76 /** Type of this call is 'answer' */77 #define IPC_CALLID_ANSWERED 178 79 /** Type of this call is 'notification' */80 #define IPC_CALLID_NOTIFICATION 281 82 /* Return values from sys_ipc_call_async(). */83 #define IPC_CALLRET_FATAL -184 85 71 /* Macros for manipulating calling data */ 86 #define IPC_SET_RETVAL(data, retval) ((data).args[0] = ( retval))72 #define IPC_SET_RETVAL(data, retval) ((data).args[0] = (sysarg_t) (retval)) 87 73 #define IPC_SET_IMETHOD(data, val) ((data).args[0] = (val)) 88 74 #define IPC_SET_ARG1(data, val) ((data).args[1] = (val)) … … 93 79 94 80 #define IPC_GET_IMETHOD(data) ((data).args[0]) 95 #define IPC_GET_RETVAL(data) (( data).args[0])81 #define IPC_GET_RETVAL(data) ((errno_t) (data).args[0]) 96 82 97 83 #define IPC_GET_ARG1(data) ((data).args[1]) -
abi/include/abi/ipc/methods.h
r8bfb163 r132ab5d1 36 36 #define ABI_IPC_METHODS_H_ 37 37 38 #include <abi/cap.h> 39 38 40 /* Well known phone descriptors */ 39 #define PHONE_NS 041 #define PHONE_NS (CAP_NIL + 1) 40 42 41 43 /** Kernel IPC interfaces -
abi/include/abi/synch.h
r8bfb163 r132ab5d1 46 46 #define SYNCH_FLAGS_INTERRUPTIBLE (1 << 1) 47 47 48 /** Could not satisfy the request without going to sleep. */49 #define ESYNCH_WOULD_BLOCK 150 /** Timeout occurred. */51 #define ESYNCH_TIMEOUT 252 /** Sleep was interrupted. */53 #define ESYNCH_INTERRUPTED 454 /** Operation succeeded without sleeping. */55 #define ESYNCH_OK_ATOMIC 856 /** Operation succeeded and did sleep. */57 #define ESYNCH_OK_BLOCKED 1658 59 #define SYNCH_FAILED(rc) \60 ((rc) & (ESYNCH_WOULD_BLOCK | ESYNCH_TIMEOUT | ESYNCH_INTERRUPTED))61 62 #define SYNCH_OK(rc) \63 ((rc) & (ESYNCH_OK_ATOMIC | ESYNCH_OK_BLOCKED))64 65 48 #endif 66 49
Note:
See TracChangeset
for help on using the changeset viewer.