ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
Go to the source code of this file.
Macros | |
#define | MIN_HSYNC_PER_SEC (240*50) |
#define | MIN_HSYNC_DELAY 100 |
#define | MAX_PS2CLOCK_PER_HSYNC (PS2_CLOCKS_PER_SEC/MIN_HSYNC_PER_SEC) |
Functions | |
static void | _sleep_waker (s32 alarm_id, u16 time, void *arg2) |
static u64 | timespec_to_us (const struct timespec *pts) |
static ps2_clock_t | us_to_ps2_clock (u64 us) |
static ps2_clock_t | timespec_to_ps2_clock (const struct timespec *pts) |
int | nanosleep (const struct timespec *req, struct timespec *rem) |
unsigned int | sleep (unsigned int seconds) |
Variables | |
static unsigned int | iPS2ClockPerHSync = MAX_PS2CLOCK_PER_HSYNC |
sleep implementation
Definition in file sleep.c.
#define MAX_PS2CLOCK_PER_HSYNC (PS2_CLOCKS_PER_SEC/MIN_HSYNC_PER_SEC) |
Definition at line 31 of file sleep.c.
References ExitHandler, and iSignalSema().
Referenced by nanosleep().
int nanosleep | ( | const struct timespec * | req, |
struct timespec * | rem | ||
) |
Definition at line 50 of file sleep.c.
References _sleep_waker(), CreateSema(), DeleteSema(), ee_sema_t::init_count, iPS2ClockPerHSync, ee_sema_t::max_count, MIN_HSYNC_DELAY, NULL, ee_sema_t::option, ps2_clock(), SetAlarm(), timespec_to_ps2_clock(), and WaitSema().
Referenced by sleep().
unsigned int sleep | ( | unsigned int | seconds | ) |
|
inlinestatic |
Definition at line 46 of file sleep.c.
References timespec_to_us(), and us_to_ps2_clock().
Referenced by nanosleep().
|
inlinestatic |
Definition at line 38 of file sleep.c.
Referenced by timespec_to_ps2_clock().
|
inlinestatic |
Definition at line 42 of file sleep.c.
References PS2_CLOCKS_PER_MSEC.
Referenced by timespec_to_ps2_clock().
|
static |
Definition at line 29 of file sleep.c.
Referenced by nanosleep().