power_play/src/app.h

30 lines
750 B
C

#ifndef APP_H
#define APP_H
#define APP_EXIT_CALLBACK_FUNC_DEF(name) void name(void)
typedef APP_EXIT_CALLBACK_FUNC_DEF(app_exit_callback_func);
struct app_statistics {
struct atomic_u64 host_bytes_sent;
struct atomic_u64 host_bytes_received;
struct atomic_u64 memory_committed;
struct atomic_u64 memory_reserved;
};
INLINE struct app_statistics *app_statistics(void)
{
extern struct app_statistics _g_app_statistics;
return &_g_app_statistics;
}
struct string app_write_path_cat(struct arena *arena, struct string filename);
/* Register a function that will be called when the application exits */
void app_register_exit_callback(app_exit_callback_func *func);
void app_entry_point(void);
void app_exit(void);
#endif