]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygserver/bsd_helper.h
Cygwin: Restore setting CC and CXX Makefile variables
[newlib-cygwin.git] / winsup / cygserver / bsd_helper.h
CommitLineData
282113ba
CV
1/* bsd_helper.h: Helps integrating BSD kernel code
2
282113ba
CV
3This file is part of Cygwin.
4
5This software is a copyrighted work licensed under the terms of the
6Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7details. */
8#ifndef _BSD_HELPER_H
9#define _BSD_HELPER_H
10
11#include <sys/types.h>
12#include <sys/syslog.h>
13
14enum tun_bool_t {
15 TUN_UNDEF = 0,
16 TUN_FALSE = 1,
17 TUN_TRUE = 2
18};
19
20#define TUNABLE_INT_FETCH(a,b) tunable_int_fetch((a),(b))
21#define TUNABLE_BOOL_FETCH(a,b) tunable_bool_fetch((a),(b))
22
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)
25
26#define jail_sysvipc_allowed true
27#define jailed(a) false
28
29extern const char *__progname;
30
31/* Global vars, determining whether the IPC stuff should be started or not. */
32extern tun_bool_t support_sharedmem;
33extern tun_bool_t support_msgqueues;
34extern tun_bool_t support_semaphores;
35
36extern SECURITY_ATTRIBUTES sec_all_nih;
37
2d015bd6
CV
38void securityinit (void);
39
8d8f4036
CV
40int win_copyin (class thread *, const void *, void *, size_t);
41int win_copyout (class thread *, const void *, void *, size_t);
282113ba
CV
42#define copyin(a,b,c) win_copyin((td),(a),(b),(c))
43#define copyout(a,b,c) win_copyout((td),(a),(b),(c))
44
d4db08d7 45void *get_token_info (HANDLE, TOKEN_INFORMATION_CLASS);
8d8f4036
CV
46int ipcperm (class thread *, struct ipc_perm *, unsigned int);
47int suser (class thread *);
282113ba
CV
48bool adjust_identity_info (struct proc *p);
49
50struct vmspace *ipc_p_vmspace (struct proc *);
8d8f4036 51int ipcexit_creat_hookthread(class thread *);
282113ba
CV
52void ipcinit (void);
53int ipcunload (void);
54
55vm_object_t _vm_pager_allocate (int, int);
56#define vm_pager_allocate(a,b,s,c,d) _vm_pager_allocate((s),(mode))
8d8f4036 57vm_object_t vm_object_duplicate (class thread *td, vm_object_t object);
282113ba
CV
58void vm_object_deallocate (vm_object_t object);
59
60void tunable_param_init (const char *, bool);
61522196 61void tunable_int_fetch (const char *, int32_t *);
282113ba
CV
62void tunable_bool_fetch (const char *, tun_bool_t *);
63
64#endif /* _BSD_HELPER_H */
This page took 0.218095 seconds and 5 git commands to generate.