
/*
   This file is part of Valgrind, a dynamic binary instrumentation
   framework.

   Copyright (C) 2000-2005 Julian Seward 
      jseward@acm.org

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307, USA.

   The GNU General Public License is contained in the file COPYING.
*/

#ifndef __VKI_UNISTD_FREEBSD_H
#define __VKI_UNISTD_FREEBSD_H

#define VG_FREEBSD_SYSCALL_STD	0
#define VG_FREEBSD_SYSCALL0	1
#define VG_FREEBSD_SYSCALL198	2

// From sys/syscall.h

#define	__NR_syscall		0
#define	__NR_exit		1
#define	__NR_fork		2
#define	__NR_read		3
#define	__NR_write		4
#define	__NR_open		5
#define	__NR_close		6
#define	__NR_wait4		7
#define	__NR_link		9
#define	__NR_unlink		10
#define	__NR_chdir		12
#define	__NR_fchdir		13
#define	__NR_mknod		14
#define	__NR_chmod		15
#define	__NR_chown		16
#define	__NR_break		17
#define	__NR_getfsstat4		18
#define	__NR_getpid		20
#define	__NR_mount		21
#define	__NR_unmount		22
#define	__NR_setuid		23
#define	__NR_getuid		24
#define	__NR_geteuid		25
#define	__NR_ptrace		26
#define	__NR_recvmsg		27
#define	__NR_sendmsg		28
#define	__NR_recvfrom		29
#define	__NR_accept		30
#define	__NR_getpeername	31
#define	__NR_getsockname	32
#define	__NR_access		33
#define	__NR_chflags		34
#define	__NR_fchflags		35
#define	__NR_sync		36
#define	__NR_kill		37
#define	__NR_getppid		39
#define	__NR_dup		41
#define	__NR_pipe		42
#define	__NR_getegid		43
#define	__NR_profil		44
#define	__NR_ktrace		45
#define	__NR_getgid		47
#define	__NR_getlogin		49
#define	__NR_setlogin		50
#define	__NR_acct		51
#define	__NR_sigaltstack	53
#define	__NR_ioctl		54
#define	__NR_reboot		55
#define	__NR_revoke		56
#define	__NR_symlink		57
#define	__NR_readlink		58
#define	__NR_execve		59
#define	__NR_umask		60
#define	__NR_chroot		61
#define	__NR_msync		65
#define	__NR_vfork		66
#define	__NR_sbrk		69
#define	__NR_sstk		70
#define	__NR_vadvise		72
#define	__NR_munmap		73
#define	__NR_mprotect		74
#define	__NR_madvise		75
#define	__NR_mincore		78
#define	__NR_getgroups		79
#define	__NR_setgroups		80
#define	__NR_getpgrp		81
#define	__NR_setpgid		82
#define	__NR_setitimer		83
#define	__NR_swapon		85
#define	__NR_getitimer		86
#define	__NR_getdtablesize	89
#define	__NR_dup2		90
#define	__NR_fcntl		92
#define	__NR_select		93
#define	__NR_fsync		95
#define	__NR_setpriority	96
#define	__NR_socket		97
#define	__NR_connect		98
#define	__NR_getpriority	100
#define	__NR_bind		104
#define	__NR_setsockopt		105
#define	__NR_listen		106
#define	__NR_gettimeofday	116
#define	__NR_getrusage		117
#define	__NR_getsockopt		118
#define	__NR_readv		120
#define	__NR_writev		121
#define	__NR_settimeofday	122
#define	__NR_fchown		123
#define	__NR_fchmod		124
#define	__NR_setreuid		126
#define	__NR_setregid		127
#define	__NR_rename		128
#define	__NR_flock		131
#define	__NR_mkfifo		132
#define	__NR_sendto		133
#define	__NR_shutdown		134
#define	__NR_socketpair		135
#define	__NR_mkdir		136
#define	__NR_rmdir		137
#define	__NR_utimes		138
#define	__NR_adjtime		140
#define	__NR_setsid		147
#define	__NR_quotactl		148
#define	__NR_nfssvc		155
#define	__NR_statfs		157
#define	__NR_fstatfs		158
#define	__NR_lgetfh		160
#define	__NR_getfh		161
#define	__NR_getdomainname	162
#define	__NR_setdomainname	163
#define	__NR_uname		164
#define	__NR_sysarch		165
#define	__NR_rtprio		166
#define	__NR_semsys		169
#define	__NR_msgsys		170
#define	__NR_shmsys		171
#define	__NR_pread6		173
#define	__NR_pwrite6		174
#define	__NR_ntp_adjtime	176
#define	__NR_setgid		181
#define	__NR_setegid		182
#define	__NR_seteuid		183
#define	__NR_stat		188
#define	__NR_fstat		189
#define	__NR_lstat		190
#define	__NR_pathconf		191
#define	__NR_fpathconf		192
#define	__NR_getrlimit		194
#define	__NR_setrlimit		195
#define	__NR_getdirentries	196
#define	__NR_mmap6		197
#define	__NR___syscall		198
#define	__NR_lseek6		199
#define	__NR_truncate		200
#define	__NR_ftruncate		201
#define	__NR___sysctl		202
#define	__NR_mlock		203
#define	__NR_munlock		204
#define	__NR_undelete		205
#define	__NR_futimes		206
#define	__NR_getpgid		207
#define	__NR_poll		209
#define	__NR_lkmnosys0		210
#define	__NR_lkmnosys1		211
#define	__NR_lkmnosys2		212
#define	__NR_lkmnosys3		213
#define	__NR_lkmnosys4		214
#define	__NR_lkmnosys5		215
#define	__NR_lkmnosys6		216
#define	__NR_lkmnosys7		217
#define	__NR_lkmnosys8		218
#define	__NR_nfs_fhopen		219
#define	__NR___semctl7		220
#define	__NR_semget		221
#define	__NR_semop		222
#define	__NR_msgctl		224
#define	__NR_msgget		225
#define	__NR_msgsnd		226
#define	__NR_msgrcv		227
#define	__NR_shmat		228
#define	__NR_shmctl7		229
#define	__NR_shmdt		230
#define	__NR_shmget		231
#define	__NR_clock_gettime	232
#define	__NR_clock_settime	233
#define	__NR_clock_getres	234
#define	__NR_nanosleep		240
#define	__NR_minherit		250
#define	__NR_rfork		251
#define	__NR_openbsd_poll	252
#define	__NR_issetugid		253
#define	__NR_lchown		254
#define	__NR_getdents		272
#define	__NR_lchmod		274
#define	__NR_netbsd_lchown	275
#define	__NR_lutimes		276
#define	__NR_netbsd_msync	277
#define	__NR_nstat		278
#define	__NR_nfstat		279
#define	__NR_nlstat		280
#define	__NR_fhstatfs		297
#define	__NR_fhopen		298
#define	__NR_fhstat		299
#define	__NR_modnext		300
#define	__NR_modstat		301
#define	__NR_modfnext		302
#define	__NR_modfind		303
#define	__NR_kldload		304
#define	__NR_kldunload		305
#define	__NR_kldfind		306
#define	__NR_kldnext		307
#define	__NR_kldstat		308
#define	__NR_kldfirstmod	309
#define	__NR_getsid		310
#define	__NR_setresuid		311
#define	__NR_setresgid		312
#define	__NR_aio_return		314
#define	__NR_aio_suspend	315
#define	__NR_aio_cancel		316
#define	__NR_aio_error		317
#define	__NR_aio_read		318
#define	__NR_aio_write		319
#define	__NR_lio_listio		320
#define	__NR_yield		321
#define	__NR_mlockall		324
#define	__NR_munlockall		325
#define	__NR___getcwd		326
#define	__NR_sched_setparam	327
#define	__NR_sched_getparam	328
#define	__NR_sched_setscheduler	329
#define	__NR_sched_getscheduler	330
#define	__NR_sched_yield	331
#define	__NR_sched_get_priority_max	332
#define	__NR_sched_get_priority_min	333
#define	__NR_sched_rr_get_interval	334
#define	__NR_utrace		335
#define	__NR_kldsym		337
#define	__NR_jail		338
#define	__NR_sigprocmask	340
#define	__NR_sigsuspend		341
#define	__NR_sigaction4		342
#define	__NR_sigpending		343
#define	__NR_sigreturn4		344
#define	__NR_sigtimedwait	345
#define	__NR_sigwaitinfo	346
#define	__NR___acl_get_file	347
#define	__NR___acl_set_file	348
#define	__NR___acl_get_fd	349
#define	__NR___acl_set_fd	350
#define	__NR___acl_delete_file	351
#define	__NR___acl_delete_fd	352
#define	__NR___acl_aclcheck_file	353
#define	__NR___acl_aclcheck_fd	354
#define	__NR_extattrctl		355
#define	__NR_extattr_set_file	356
#define	__NR_extattr_get_file	357
#define	__NR_extattr_delete_file	358
#define	__NR_aio_waitcomplete	359
#define	__NR_getresuid		360
#define	__NR_getresgid		361
#define	__NR_kqueue		362
#define	__NR_kevent		363
#define	__NR_extattr_set_fd	371
#define	__NR_extattr_get_fd	372
#define	__NR_extattr_delete_fd	373
#define	__NR___setugid		374
#define	__NR_nfsclnt		375
#define	__NR_eaccess		376
#define	__NR_nmount		378
#define	__NR_kse_exit		379
#define	__NR_kse_wakeup		380
#define	__NR_kse_create		381
#define	__NR_kse_thr_interrupt	382
#define	__NR_kse_release	383
#define	__NR___mac_get_proc	384
#define	__NR___mac_set_proc	385
#define	__NR___mac_get_fd	386
#define	__NR___mac_get_file	387
#define	__NR___mac_set_fd	388
#define	__NR___mac_set_file	389
#define	__NR_kenv		390
#define	__NR_lchflags		391
#define	__NR_uuidgen		392
#define	__NR_sendfile		393
#define	__NR_mac_syscall	394
#define	__NR_getfsstat		395
#define	__NR_statfs6		396
#define	__NR_fstatfs6		397
#define	__NR_fhstatfs6		398
#define	__NR_ksem_close		400
#define	__NR_ksem_post		401
#define	__NR_ksem_wait		402
#define	__NR_ksem_trywait	403
#define	__NR_ksem_init		404
#define	__NR_ksem_open		405
#define	__NR_ksem_unlink	406
#define	__NR_ksem_getvalue	407
#define	__NR_ksem_destroy	408
#define	__NR___mac_get_pid	409
#define	__NR___mac_get_link	410
#define	__NR___mac_set_link	411
#define	__NR_extattr_set_link	412
#define	__NR_extattr_get_link	413
#define	__NR_extattr_delete_link	414
#define	__NR___mac_execve	415
#define	__NR_sigaction		416
#define	__NR_sigreturn		417
#define	__NR_getcontext		421
#define	__NR_setcontext		422
#define	__NR_swapcontext	423
#define	__NR_swapoff		424
#define	__NR___acl_get_link	425
#define	__NR___acl_set_link	426
#define	__NR___acl_delete_link	427
#define	__NR___acl_aclcheck_link	428
#define	__NR_sigwait		429
#define	__NR_thr_create		430
#define	__NR_thr_exit		431
#define	__NR_thr_self		432
#define	__NR_thr_kill		433
#define	__NR__umtx_lock		434
#define	__NR__umtx_unlock	435
#define	__NR_jail_attach	436
#define	__NR_extattr_list_fd	437
#define	__NR_extattr_list_file	438
#define	__NR_extattr_list_link	439
#define	__NR_kse_switchin	440
#define	__NR_ksem_timedwait	441
#define	__NR_thr_suspend	442
#define	__NR_thr_wake		443
#define	__NR_kldunloadf		444
#define	__NR_audit		445
#define	__NR_auditon		446
#define	__NR_getauid		447
#define	__NR_setauid		448
#define	__NR_getaudit		449
#define	__NR_setaudit		450
#define	__NR_getaudit_addr	451
#define	__NR_setaudit_addr	452
#define	__NR_auditctl		453
#define	__NR__umtx_op		454
#define	__NR_thr_new		455
#define	__NR_sigqueue		456
#define	__NR_kmq_open		457
#define	__NR_kmq_setattr	458
#define	__NR_kmq_timedreceive	459
#define	__NR_kmq_timedsend	460
#define	__NR_kmq_notify		461
#define	__NR_kmq_unlink		462
#define	__NR_abort2		463
#define	__NR_thr_set_name	464
#define	__NR_aio_fsync		465
#define	__NR_rtprio_thread	466
#define	__NR_nosys467		467
#define	__NR_nosys468		468
#define	__NR___getpath_fromfd	469
#define	__NR___getpath_fromaddr	470
#define	__NR_sctp_peeloff	471
#define	__NR_sctp_generic_sendmsg	472
#define	__NR_sctp_generic_sendmsg_iov	473
#define	__NR_sctp_generic_recvmsg	474
#define	__NR_pread		475
#define	__NR_pwrite		476
#define	__NR_mmap		477
#define	__NR_lseek		478
#define	__NR_truncate7		479
#define	__NR_ftruncate7		480
#define	__NR_thr_kill2		481
#define	__NR_shm_open		482
#define	__NR_shm_unlink		483
#define	__NR_cpuset		484
#define	__NR_cpuset_setid	485
#define	__NR_cpuset_getid	486
#define	__NR_cpuset_getaffinity	487
#define	__NR_cpuset_setaffinity	488
#define	__NR_faccessat		489
#define	__NR_fchmodat		490
#define	__NR_fchownat		491
#define	__NR_fexecve		492
#define	__NR_fstatat		493
#define	__NR_futimesat		494
#define	__NR_linkat		495
#define	__NR_mkdirat		496
#define	__NR_mkfifoat		497
#define	__NR_mknodat		498
#define	__NR_openat		499
#define	__NR_readlinkat		500
#define	__NR_renameat		501
#define	__NR_symlinkat		502
#define	__NR_unlinkat		503
#define	__NR_posix_openpt	504
#define	__NR___semctl		510
#define	__NR_shmctl		512

#define __NR_fake_sigreturn	1000

#endif /* __VKI_UNISTD_FREEBSD_H */
