Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 #ifndef __NVIF_NOTIFY_H__
0003 #define __NVIF_NOTIFY_H__
0004 
0005 struct nvif_notify {
0006     struct nvif_object *object;
0007     const char *name;
0008     int index;
0009 
0010 #define NVIF_NOTIFY_USER 0
0011 #define NVIF_NOTIFY_WORK 1
0012     unsigned long flags;
0013     atomic_t putcnt;
0014     void (*dtor)(struct nvif_notify *);
0015 #define NVIF_NOTIFY_DROP 0
0016 #define NVIF_NOTIFY_KEEP 1
0017     int  (*func)(struct nvif_notify *);
0018 
0019     /* this is const for a *very* good reason - the data might be on the
0020      * stack from an irq handler.  if you're not nvif/notify.c then you
0021      * should probably think twice before casting it away...
0022      */
0023     const void *data;
0024     u32 size;
0025     struct work_struct work;
0026 };
0027 
0028 int  nvif_notify_ctor(struct nvif_object *, const char *name,
0029               int (*func)(struct nvif_notify *), bool work, u8 type,
0030               void *data, u32 size, u32 reply, struct nvif_notify *);
0031 int  nvif_notify_dtor(struct nvif_notify *);
0032 int  nvif_notify_get(struct nvif_notify *);
0033 int  nvif_notify_put(struct nvif_notify *);
0034 int  nvif_notify(const void *, u32, const void *, u32);
0035 #endif