diff options
Diffstat (limited to 'lwrapper.h')
-rw-r--r-- | lwrapper.h | 53 |
1 files changed, 0 insertions, 53 deletions
@@ -17,58 +17,5 @@ #ifndef LWRAPPER_H #define LWRAPPER_H -#include <stdint.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include "xf86drm.h" -#include "radeon_bo.h" -#include "radeon_drm.h" - -typedef uint8_t u8; -typedef uint32_t u32; -typedef uint64_t u64; -#define GFP_KERNEL 0 -#define kmalloc(s, gfp) malloc(s) -#define kfree(p) free(p) - -struct idr { - u32 cid; -}; - -struct mutex { - int lock; -}; - -#define mutex_init(ptr) -#define mutex_lock(ptr) -#define mutex_unlock(ptr) - -extern int idr_pre_get(struct idr *idp, int gfp_mask); -extern int idr_get_new(struct idr *idp, void *ptr, int *id); -extern void idr_destroy(struct idr *idp); -extern void idr_init(struct idr *idp); - -#include "list.h" -#define dev_err(d, p, args...) fprintf(stderr, p, ##args) - -struct kref { - int refcount; -}; - -void kref_set(struct kref *kref, int num); -void kref_init(struct kref *kref); -void kref_get(struct kref *kref); -int kref_put(struct kref *kref, void (*release) (struct kref *kref)); -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - * - */ -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) #endif |