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