mirror of
https://github.com/darlinghq/darling-libxpc.git
synced 2024-11-26 21:20:28 +00:00
Add stubs for transaction_private
This commit is contained in:
parent
edac36c44d
commit
3c456b6db0
@ -32,6 +32,7 @@ set(xpc_sources
|
||||
subr_sbuf.c
|
||||
xpc_pipe.c
|
||||
reboot3.c
|
||||
transaction_private.c
|
||||
)
|
||||
|
||||
set(DYLIB_INSTALL_NAME "/usr/lib/system/libxpc.dylib")
|
||||
|
10
os/transaction_private.h
Normal file
10
os/transaction_private.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef _OS_TRANSACTION_PRIVATE_H_
|
||||
#define _OS_TRANSACTION_PRIVATE_H_
|
||||
|
||||
#include <os/object.h>
|
||||
|
||||
OS_OBJECT_DECL_CLASS(os_transaction);
|
||||
|
||||
os_transaction_t os_transaction_create(const char* transaction_name);
|
||||
|
||||
#endif // _OS_TRANSACTION_PRIVATE_H_
|
31
transaction_private.c
Normal file
31
transaction_private.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include <os/transaction_private.h>
|
||||
#include <os/object_private.h>
|
||||
|
||||
struct os_transaction_s;
|
||||
struct os_transaction_extra_vtable_s {};
|
||||
struct os_transaction_vtable_s {
|
||||
void (*_os_obj_xref_dispose)(_os_object_t);
|
||||
void (*_os_obj_dispose)(_os_object_t);
|
||||
struct os_transaction_extra_vtable_s _os_obj_vtable;
|
||||
};
|
||||
extern const struct os_transaction_vtable_s OS_OBJECT_CLASS_SYMBOL(os_transaction) __asm__(OS_OBJC_CLASS_RAW_SYMBOL_NAME(OS_OBJECT_CLASS(os_transaction)));
|
||||
|
||||
const struct os_transaction_vtable_s OS_OBJECT_CLASS_SYMBOL(os_transaction) = {
|
||||
._os_obj_xref_dispose = NULL,
|
||||
._os_obj_dispose = NULL,
|
||||
._os_obj_vtable = {},
|
||||
};
|
||||
|
||||
#define OS_TRANSACTION_CLASS (&OS_OBJECT_CLASS_SYMBOL(os_transaction))
|
||||
|
||||
struct os_transaction_s {
|
||||
_OS_OBJECT_HEADER(
|
||||
struct os_transaction_vtable_s* os_obj_isa,
|
||||
os_obj_ref_cnt,
|
||||
os_obj_xref_cnt
|
||||
);
|
||||
};
|
||||
|
||||
os_transaction_t os_transaction_create(const char* transaction_name) {
|
||||
return (os_transaction_t)_os_object_alloc_realized(OS_TRANSACTION_CLASS, sizeof(struct os_transaction_s));
|
||||
};
|
Loading…
Reference in New Issue
Block a user