File: notify.h

package info (click to toggle)
linux 6.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488,076 kB
  • sloc: ansic: 23,401,844; asm: 266,744; sh: 108,976; makefile: 49,705; python: 36,927; perl: 36,810; cpp: 6,044; yacc: 4,904; lex: 2,722; awk: 1,440; ruby: 25; sed: 5
file content (35 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (14)
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
/* SPDX-License-Identifier: MIT */
#ifndef __NVIF_NOTIFY_H__
#define __NVIF_NOTIFY_H__

struct nvif_notify {
	struct nvif_object *object;
	const char *name;
	int index;

#define NVIF_NOTIFY_USER 0
#define NVIF_NOTIFY_WORK 1
	unsigned long flags;
	atomic_t putcnt;
	void (*dtor)(struct nvif_notify *);
#define NVIF_NOTIFY_DROP 0
#define NVIF_NOTIFY_KEEP 1
	int  (*func)(struct nvif_notify *);

	/* this is const for a *very* good reason - the data might be on the
	 * stack from an irq handler.  if you're not nvif/notify.c then you
	 * should probably think twice before casting it away...
	 */
	const void *data;
	u32 size;
	struct work_struct work;
};

int  nvif_notify_ctor(struct nvif_object *, const char *name,
		      int (*func)(struct nvif_notify *), bool work, u8 type,
		      void *data, u32 size, u32 reply, struct nvif_notify *);
int  nvif_notify_dtor(struct nvif_notify *);
int  nvif_notify_get(struct nvif_notify *);
int  nvif_notify_put(struct nvif_notify *);
int  nvif_notify(const void *, u32, const void *, u32);
#endif