0001
0002 #ifndef __NVIF_PARENT_H__
0003 #define __NVIF_PARENT_H__
0004 #include <nvif/os.h>
0005 struct nvif_object;
0006
0007 struct nvif_parent {
0008 const struct nvif_parent_func {
0009 void (*debugf)(struct nvif_object *, const char *fmt, ...) __printf(2, 3);
0010 void (*errorf)(struct nvif_object *, const char *fmt, ...) __printf(2, 3);
0011 } *func;
0012 };
0013
0014 static inline void
0015 nvif_parent_dtor(struct nvif_parent *parent)
0016 {
0017 parent->func = NULL;
0018 }
0019
0020 static inline void
0021 nvif_parent_ctor(const struct nvif_parent_func *func, struct nvif_parent *parent)
0022 {
0023 parent->func = func;
0024 }
0025 #endif