Style change.
[iolib.git] / syscalls / pkgdcl.lisp
blobc27327effe944a1a446f264c2ff7d84319000ffd
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Package definition.
4 ;;;
6 (in-package :common-lisp-user)
8 (defpackage :iolib.syscalls
9 (:nicknames #:isys)
10 (:use :iolib.base :cffi)
11 (:export
12 ;; Conditions
13 #:condition-info-mixin
14 #:system-error
15 #:syscall-error
16 #:posix-error
17 #:poll-error
18 #:poll-timeout
20 ;; Condition accessors
21 #:code-of
22 #:identifier-of
23 #:message-of
24 #:event-type-of
25 #:os-handle-of
27 ;; Pathname Functions
28 #:native-namestring
30 ;; Type Designators
31 #:filename
32 #:filename-designator
33 #:pointer-or-nil
34 #:pointer-or-nil-designator
35 #:bool
36 #:bool-designator
38 ;; Misc
39 #:repeat-decreasing-timeout
40 #:repeat-upon-condition-decreasing-timeout
42 ;; Return wrapper
43 #:return-wrapper
44 #:error-predicate-of
45 #:return-filter-of
46 #:error-generator-of
47 #:base-type-of
48 #:never-fails
49 #:signal-posix-error
50 #:signal-posix-error/restart
52 ;; Syscall definition
53 #:defentrypoint
54 #:defcfun*
55 #:defsyscall
56 #:defsyscall*
58 ;;;--------------------------------------------------------------------------
59 ;;; Syscalls
60 ;;;--------------------------------------------------------------------------
62 ;; Specials
63 #:*default-open-mode*
64 #:*environ*
66 ;; Errno-related functions
67 #:%sys-strerror
68 #:get-errno
69 #:set-errno
71 ;; Memory manipulation functions
72 #:%sys-memset
73 #:%sys-bzero
74 #:%sys-memcpy
75 #:%sys-memmove
77 ;; Files
78 #:%sys-read
79 #:%sys-write
80 #:%sys-pread
81 #:%sys-pwrite
82 #:%sys-open
83 #:%sys-creat
84 #:%sys-pipe
85 #:%sys-mkfifo
86 #:%sys-umask
87 #:%sys-lseek
88 #:%sys-access
89 #:%sys-truncate
90 #:%sys-ftruncate
91 #:%sys-rename
92 #:%sys-link
93 #:%sys-symlink
94 #:%sys-readlink
95 #:%sys-unlink
96 #:%sys-chown
97 #:%sys-fchown
98 #:%sys-lchown
99 #:%sys-chmod
100 #:%sys-fchmod
101 #:%sys-stat
102 #:%sys-fstat
103 #:%sys-lstat
104 #:%sys-sync
105 #:%sys-fsync
106 #:%sys-mkstemp
108 ;; Directories
109 #:%sys-mkdir
110 #:%sys-rmdir
111 #:%sys-chdir
112 #:%sys-fchdir
113 #:%sys-getcwd
114 #:%sys-mkdtemp
116 ;; File descriptors
117 #:%sys-close
118 #:%sys-dup
119 #:%sys-dup2
120 #:%sys-ioctl/2
121 #:%sys-ioctl/3
122 #:%sys-fd-open-p
124 ;; I/O Polling
125 #:%sys-poll
127 ;; Memory mapping
128 #:%sys-mmap
129 #:%sys-munmap
131 ;; Time
132 #:%sys-usleep
133 #:%sys-time
134 #:%sys-gettimeofday
135 #:%sys-get-monotonic-time
137 ;; Environment
138 #:%sys-getenv
139 #:%sys-setenv
140 #:%sys-unsetenv
142 ;; Local info
143 #:%sys-gethostname
144 #:%sys-getdomainname
146 ;;;--------------------------------------------------------------------------
147 ;;; Foreign types and constants
148 ;;;--------------------------------------------------------------------------
150 ;; Primitive type sizes
151 #:size-of-char
152 #:size-of-short
153 #:size-of-int
154 #:size-of-long
155 #:size-of-long-long
156 #:size-of-pointer
158 ;; Types
159 #:size-t #:size-of-size-t
160 #:ssize-t #:size-of-ssize-t
161 #:pid-t #:size-of-pid-t
162 #:gid-t #:size-of-gid-t
163 #:uid-t #:size-of-uid-t
164 #:off-t #:size-of-off-t
165 #:mode-t #:size-of-mode-t
166 #:time-t #:size-of-time-t
167 #:useconds-t #:size-of-useconds-t
168 #:suseconds-t #:size-of-suseconds-t
169 #:dev-t #:size-of-dev-t
170 #:ino-t #:size-of-ino-t
171 #:nlink-t #:size-of-nlink-t
172 #:blksize-t #:size-of-blksize-t
173 #:blkcnt-t #:size-of-blkcnt-t
174 #:nfds-t #:size-of-nfds-t
176 ;; OPEN()
177 #:o-rdonly
178 #:o-wronly
179 #:o-rdwr
180 #:o-creat
181 #:o-excl
182 #:o-trunc
183 #:o-append
184 #:o-noctty
185 #:o-nonblock
186 #:o-ndelay
187 #:o-sync
188 #:o-nofollow
189 #:o-async
191 ;; LSEEK()
192 #:seek-set
193 #:seek-cur
194 #:seek-end
196 ;; ACCESS()
197 #:r-ok
198 #:w-ok
199 #:x-ok
200 #:f-ok
202 ;; STAT()
203 #:s-irwxu
204 #:s-irusr
205 #:s-iwusr
206 #:s-ixusr
207 #:s-ifmt
208 #:s-ififo
209 #:s-ifchr
210 #:s-ifdir
211 #:s-ifblk
212 #:s-ifreg
213 #:s-ifwht
214 #:s-iread
215 #:s-iwrite
216 #:s-iexec
217 #:s-irwxg
218 #:s-irgrp
219 #:s-iwgrp
220 #:s-ixgrp
221 #:s-irwxo
222 #:s-iroth
223 #:s-iwoth
224 #:s-ixoth
225 #:s-isuid
226 #:s-isgid
227 #:s-isvtx
228 #:s-iflnk
229 #:s-ifsock
230 #:path-max
232 ;; MMAP()
233 #:prot-none
234 #:prot-read
235 #:prot-write
236 #:prot-exec
237 #:map-shared
238 #:map-private
239 #:map-fixed
240 #:map-failed
242 ;; POLL()
243 #:pollin
244 #:pollrdnorm
245 #:pollrdband
246 #:pollpri
247 #:pollout
248 #:pollwrnorm
249 #:pollwrband
250 #:pollerr
251 #:pollrdhup
252 #:pollhup
253 #:pollnval
255 ;; IOCTL()
256 #:fionbio
257 #:fionread
259 ;;; Structs
261 ;; timespec
262 #:timespec #:size-of-timespec
263 #:sec
264 #:nsec
266 ;; timeval
267 #:timeval #:size-of-timeval
268 #:sec
269 #:usec
271 ;; stat
272 #:stat #:size-of-stat
273 #:dev #:stat-dev
274 #:ino #:stat-ino
275 #:mode #:stat-mode
276 #:nlink #:stat-nlink
277 #:uid #:stat-uid
278 #:gid #:stat-gid
279 #:rdev #:stat-rdev
280 #:size #:stat-size
281 #:blksize #:stat-blksize
282 #:blocks #:stat-blocks
283 #:atime #:stat-atime
284 #:mtime #:stat-mtime
285 #:ctime #:stat-ctime
287 ;; pollfd
288 #:pollfd #:size-of-pollfd
289 #:fd
290 #:events
291 #:revents
293 ;; Syscall error codes
294 #:errno-values
295 #:eperm #:enoent #:esrch #:eintr #:eio #:enxio #:e2big #:enoexec
296 #:ebadf #:echild #:eagain #:enomem #:eacces #:efault #:ebusy #:eexist
297 #:exdev #:enodev #:enotdir #:eisdir #:einval #:enfile #:emfile
298 #:enotty #:efbig #:enospc #:espipe #:erofs #:emlink #:epipe #:edom
299 #:erange #:edeadlk #:enametoolong #:enolck #:enosys #:enotempty
300 #:echrng #:el2nsync #:el3hlt #:el3rst #:elnrng #:eunatch #:enocsi
301 #:el2hlt #:ebade #:ebadr #:exfull #:enoano #:ebadrqc #:ebadslt
302 #:edeadlock #:ebfont #:enostr #:enodata #:etime #:enosr #:enopkg
303 #:eadv #:esrmnt #:ecomm #:edotdot #:enotuniq #:ebadfd #:elibscn
304 #:elibmax #:elibexec #:eilseq #:erestart #:estrpipe #:euclean
305 #:enotnam #:enavail #:eremoteio #:enomedium #:emediumtype #:estale
306 #:enotblk #:etxtbsy #:eusers #:eloop #:ewouldblock #:enomsg #:eidrm
307 #:eproto #:emultihop #:ebadmsg #:eoverflow #:edquot #:einprogress
308 #:ealready #:eprotonosupport #:esocktnosupport #:enotsock
309 #:edestaddrreq #:emsgsize #:eprototype #:enoprotoopt #:eremote
310 #:enolink #:epfnosupport #:eafnosupport #:eaddrinuse #:eaddrnotavail
311 #:enetdown #:enetunreach #:enetreset #:econnaborted #:econnreset
312 #:eisconn #:enotconn #:eshutdown #:etoomanyrefs #:etimedout
313 #:econnrefused #:ehostdown #:ehostunreach #:enonet #:enobufs
314 #:eopnotsupp