1 /* bsd_helper.h: Helps integrating BSD kernel code
3 This file is part of Cygwin.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
11 #include <sys/types.h>
12 #include <sys/syslog.h>
20 #define TUNABLE_INT_FETCH(a,b) tunable_int_fetch((a),(b))
21 #define TUNABLE_BOOL_FETCH(a,b) tunable_bool_fetch((a),(b))
23 #define sys_malloc(a,b,c) (malloc(a)?:(panic("malloc failed in %s, line %d"),(void*)NULL))
24 #define sys_free(a,b) free(a)
26 #define jail_sysvipc_allowed true
27 #define jailed(a) false
29 extern const char *__progname
;
31 /* Global vars, determining whether the IPC stuff should be started or not. */
32 extern tun_bool_t support_sharedmem
;
33 extern tun_bool_t support_msgqueues
;
34 extern tun_bool_t support_semaphores
;
36 extern SECURITY_ATTRIBUTES sec_all_nih
;
38 void securityinit (void);
40 int win_copyin (class thread
*, const void *, void *, size_t);
41 int win_copyout (class thread
*, const void *, void *, size_t);
42 #define copyin(a,b,c) win_copyin((td),(a),(b),(c))
43 #define copyout(a,b,c) win_copyout((td),(a),(b),(c))
45 void *get_token_info (HANDLE
, TOKEN_INFORMATION_CLASS
);
46 int ipcperm (class thread
*, struct ipc_perm
*, unsigned int);
47 int suser (class thread
*);
48 bool adjust_identity_info (struct proc
*p
);
50 struct vmspace
*ipc_p_vmspace (struct proc
*);
51 int ipcexit_creat_hookthread(class thread
*);
55 vm_object_t
_vm_pager_allocate (int, int);
56 #define vm_pager_allocate(a,b,s,c,d) _vm_pager_allocate((s),(mode))
57 vm_object_t
vm_object_duplicate (class thread
*td
, vm_object_t object
);
58 void vm_object_deallocate (vm_object_t object
);
60 void tunable_param_init (const char *, bool);
61 void tunable_int_fetch (const char *, int32_t *);
62 void tunable_bool_fetch (const char *, tun_bool_t
*);
64 #endif /* _BSD_HELPER_H */