-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgvm_notify.h
More file actions
47 lines (37 loc) · 745 Bytes
/
Copy pathgvm_notify.h
File metadata and controls
47 lines (37 loc) · 745 Bytes
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
#ifndef GVM_NOTIFY_H
#define GVM_NOTIFY_H
#include <pthread.h>
#include <stdint.h>
#include <cuda.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
GVM_NOTICE_EVICTION = 0,
GVM_NOTICE_AVAILABILITY = 1,
} gvm_notice_type_t;
#define UVM_WAIT_NOTICE 82
#define NV_OK 0x00000000
typedef struct
{
CUuuid uuid;
gvm_notice_type_t type;
union {
struct {
uint64_t target_memory;
uint64_t current_memory;
} eviction;
struct {
uint64_t available_memory;
} availability;
};
int rmStatus;
} UVM_WAIT_NOTICE_PARAMS;
typedef void (*gvm_notice_fn)(const UVM_WAIT_NOTICE_PARAMS *params);
int gvm_register_notify(gvm_notice_fn handler);
void gvm_unregister_notify(void);
#ifdef __cplusplus
}
#endif
#endif