1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVIF_NOTIFY_H__
3 #define __NVIF_NOTIFY_H__
6 struct nvif_object
*object
;
10 #define NVIF_NOTIFY_USER 0
11 #define NVIF_NOTIFY_WORK 1
14 void (*dtor
)(struct nvif_notify
*);
15 #define NVIF_NOTIFY_DROP 0
16 #define NVIF_NOTIFY_KEEP 1
17 int (*func
)(struct nvif_notify
*);
19 /* this is const for a *very* good reason - the data might be on the
20 * stack from an irq handler. if you're not nvif/notify.c then you
21 * should probably think twice before casting it away...
25 struct work_struct work
;
28 int nvif_notify_ctor(struct nvif_object
*, const char *name
,
29 int (*func
)(struct nvif_notify
*), bool work
, u8 type
,
30 void *data
, u32 size
, u32 reply
, struct nvif_notify
*);
31 int nvif_notify_dtor(struct nvif_notify
*);
32 int nvif_notify_get(struct nvif_notify
*);
33 int nvif_notify_put(struct nvif_notify
*);
34 int nvif_notify(const void *, u32
, const void *, u32
);