wut/include/coreinit/threadqueue.h

62 lines
1.2 KiB
C
Raw Normal View History

2016-01-07 13:07:13 +01:00
#pragma once
#include <wut.h>
2016-01-07 17:02:54 +01:00
/**
* \defgroup coreinit_threadq Thread Queue
* \ingroup coreinit
* @{
*/
2016-01-07 15:09:43 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2016-01-07 13:07:13 +01:00
2016-01-07 13:45:18 +01:00
typedef struct OSThread OSThread;
2016-01-07 13:07:13 +01:00
typedef struct OSThreadLink OSThreadLink;
typedef struct OSThreadQueue OSThreadQueue;
typedef struct OSThreadSimpleQueue OSThreadSimpleQueue;
struct OSThreadLink
{
OSThread *prev;
OSThread *next;
};
2018-06-20 11:31:53 +02:00
WUT_CHECK_OFFSET(OSThreadLink, 0x00, prev);
WUT_CHECK_OFFSET(OSThreadLink, 0x04, next);
WUT_CHECK_SIZE(OSThreadLink, 0x8);
2016-01-07 13:07:13 +01:00
struct OSThreadQueue
{
OSThread *head;
OSThread *tail;
void *parent;
2018-06-20 11:31:53 +02:00
WUT_UNKNOWN_BYTES(4);
2016-01-07 13:07:13 +01:00
};
2018-06-20 11:31:53 +02:00
WUT_CHECK_OFFSET(OSThreadQueue, 0x00, head);
WUT_CHECK_OFFSET(OSThreadQueue, 0x04, tail);
WUT_CHECK_OFFSET(OSThreadQueue, 0x08, parent);
WUT_CHECK_SIZE(OSThreadQueue, 0x10);
2016-01-07 13:07:13 +01:00
struct OSThreadSimpleQueue
{
OSThread *head;
OSThread *tail;
};
2018-06-20 11:31:53 +02:00
WUT_CHECK_OFFSET(OSThreadSimpleQueue, 0x00, head);
WUT_CHECK_OFFSET(OSThreadSimpleQueue, 0x04, tail);
WUT_CHECK_SIZE(OSThreadSimpleQueue, 0x08);
2016-01-07 13:07:13 +01:00
void
OSInitThreadQueue(OSThreadQueue *queue);
void
OSInitThreadQueueEx(OSThreadQueue *queue,
void *parent);
2016-01-07 15:09:43 +01:00
#ifdef __cplusplus
}
#endif
2016-01-07 17:02:54 +01:00
/** @} */