]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygserver/bsd_helper.h
* Makefile.in: Add -lntdll to link line.
[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
2d015bd6
CV
40void securityinit (void);
41
282113ba
CV
42int win_copyin (struct thread *, const void *, void *, size_t);
43int win_copyout (struct thread *, const void *, void *, size_t);
44#define copyin(a,b,c) win_copyin((td),(a),(b),(c))
45#define copyout(a,b,c) win_copyout((td),(a),(b),(c))
46
47int ipcperm (struct thread *, struct ipc_perm *, unsigned int);
48int suser (struct thread *);
49bool adjust_identity_info (struct proc *p);
50
51struct vmspace *ipc_p_vmspace (struct proc *);
52int ipcexit_creat_hookthread(struct thread *);
53void ipcinit (void);
54int ipcunload (void);
55
56vm_object_t _vm_pager_allocate (int, int);
57#define vm_pager_allocate(a,b,s,c,d) _vm_pager_allocate((s),(mode))
58vm_object_t vm_object_duplicate (struct thread *td, vm_object_t object);
59void vm_object_deallocate (vm_object_t object);
60
61void tunable_param_init (const char *, bool);
62void tunable_int_fetch (const char *, long *);
63void tunable_bool_fetch (const char *, tun_bool_t *);
64
65#endif /* _BSD_HELPER_H */
This page took 0.084322 seconds and 5 git commands to generate.