Use __simple_kprintf and fix os_transaction declaration type

This commit is contained in:
Ariel Abreu 2020-11-07 00:14:39 -05:00
parent 183f5ccf20
commit a5bdf2f177
No known key found for this signature in database
GPG Key ID: ECF8C2B9E8AD3E6B
2 changed files with 8 additions and 8 deletions

View File

@ -1,9 +1,13 @@
#ifndef _OS_TRANSACTION_PRIVATE_H_
#define _OS_TRANSACTION_PRIVATE_H_
#include <os/object.h>
#include <os/object_private.h>
OS_OBJECT_DECL_CLASS(os_transaction);
#if OS_OBJECT_USE_OBJC
OS_OBJECT_DECL_IMPL_CLASS(os_transaction, OS_OBJECT_CLASS(object));
#else
typedef struct os_transaction_s* os_transaction_t;
#endif
os_transaction_t os_transaction_create(const char* transaction_name);

View File

@ -30,6 +30,7 @@
#include <sys/queue.h>
#include "xpc/xpc.h"
#include <darling/emulation/simple.h>
#ifdef XPC_DEBUG
#define debugf(...) \
@ -39,12 +40,7 @@
fprintf(stderr, "\n"); \
} while(0);
#else
#define debugf(...) \
do { \
char buf[512]; \
sprintf(buf, "libxpc: " __VA_ARGS__); \
lkm_call(0x1028, buf); \
} while(0);
#define debugf(...) __simple_kprintf("libxpc: " __VA_ARGS__)
#endif
#define _XPC_TYPE_INVALID 0