blob: f6d3f6b854af92cf17e09b5987bbb16fec035396 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifndef __LINUX_ACALL_H
#define __LINUX_ACALL_H
/*
* The kernel makes a private copy of this during sys_acall_submit(). Once
* that call returns userspace does not need to keep it around.
*
* The flags field will be used to indicate the presence of fields which
* are added to the end of the struct over time. To support this the
* submission call must refuse submission for structs which contain flags
* which it doesn't recognize.
*/
struct acall_submission {
u32 nr;
u32 flags;
u64 cookie;
u64 completion_ring_pointer;
u64 completion_pointer;
u64 id_pointer;
u64 args[6];
};
#define ACALL_SUBMIT_THREAD_POOL 1
/*
* This is used by userspace to specify an operation for cancelation or
* waiting. The data here only has significance to the kernel.
*/
struct acall_id {
unsigned char opaque[16];
};
struct acall_completion {
u64 return_code;
u64 cookie;
};
/*
* 'nr' is read by the kernel each time it tries to store an event in
* the ring.
*
* 'head' is written by the kernel as it adds events. Once it changes than
* the kernel will be writing an acall_completion struct into the ring.
* A non-zero cookie field of the completion struct indicates that the
* completion has been written. Once it is non-zero then the return_code
* can be loaded after issuing a read memory barrier.
*/
struct acall_completion_ring {
u32 head;
u32 nr;
struct acall_completion comps[0];
};
#endif
|