struct ledger {
uint64_t l_id;
- struct os_refcnt l_refs;
+ os_refcnt_t l_refs;
int32_t l_size;
struct ledger_template *l_template;
struct ledger_entry l_entries[0] __attribute__((aligned(8)));
extern void ledger_init(void);
extern ledger_template_t ledger_template_create(const char *name);
+extern ledger_template_t ledger_template_copy(ledger_template_t template, const char *name);
extern void ledger_template_dereference(ledger_template_t template);
extern int ledger_entry_add(ledger_template_t template, const char *key,
const char *group, const char *units);
extern void ledger_ast(thread_t thread);
-extern int ledger_reference_count(ledger_t ledger);
-extern kern_return_t ledger_reference(ledger_t ledger);
-extern kern_return_t ledger_dereference(ledger_t ledger);
+extern void ledger_reference(ledger_t ledger);
+extern void ledger_dereference(ledger_t ledger);
/* Support for ledger() syscall */
#ifdef LEDGER_DEBUG