<sys/cdio.h>: Remove definitions that are related to unimplemented ioctls.
[dragonfly.git] / sys / sys / lwp.h
1 #ifndef _SYS_LWP_H_
2 #define _SYS_LWP_H_
3
4 #include <sys/types.h>
5
6 /*
7  * Parameters for the creation of a new lwp.
8  */
9 struct lwp_params {
10         void (*lwp_func)(void *); /* Function to start execution */
11         void *lwp_arg;          /* Parameter to this function */
12         void *lwp_stack;        /* Stack address to use */
13         lwpid_t *lwp_tid1;      /* Address to copy out new tid */
14         lwpid_t *lwp_tid2;      /* Same */
15 };
16
17 #if !defined(_KERNEL) || defined(_KERNEL_VIRTUAL)
18
19 #include <machine/cpumask.h>
20
21 __BEGIN_DECLS
22
23 struct rtprio;
24
25 int     lwp_create(struct lwp_params *);
26 int     lwp_create2(struct lwp_params *, const cpumask_t *);
27 #ifndef _LWP_GETTID_DECLARED
28 lwpid_t lwp_gettid(void);
29 #define _LWP_GETTID_DECLARED
30 #endif
31 #ifndef _LWP_SETNAME_DECLARED
32 int     lwp_setname(lwpid_t, const char *);
33 #define _LWP_SETNAME_DECLARED
34 #endif
35 #ifndef _LWP_RTPRIO_DECLARED
36 int     lwp_rtprio(int, pid_t, lwpid_t, struct rtprio *);
37 #define _LWP_RTPRIO_DECLARED
38 #endif
39 int     lwp_setaffinity(pid_t, lwpid_t, const cpumask_t *);
40 int     lwp_getaffinity(pid_t, lwpid_t, cpumask_t *);
41 #ifndef _LWP_KILL_DECLARED
42 int     lwp_kill(pid_t, lwpid_t, int);
43 #define _LWP_KILL_DECLARED
44 #endif
45
46 __END_DECLS
47
48 #endif  /* !_KERNEL */
49
50 #endif  /* !_SYS_LWP_H_ */