Rev 9836 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9836 | Rev 9864 | ||
---|---|---|---|
Line 1615... | Line 1615... | ||
1615 | 1615 | ||
Line 1616... | Line 1616... | ||
1616 | #define _ksys_clear_window_title() _ksys_set_window_title(NULL) |
1616 | #define _ksys_clear_window_title() _ksys_set_window_title(NULL) |
Line 1617... | Line 1617... | ||
1617 | 1617 | ||
1618 | /*============= Function 77, subfunction 0 - create futex object =============*/ |
1618 | /*============= Function 77, subfunction 0 - create futex object =============*/ |
1619 | 1619 | ||
1620 | KOSAPI void* _ksys_futex_create(void* futex_control_addr) |
1620 | KOSAPI uint32_t _ksys_futex_create(int* futex_ctrl) |
1621 | { |
1621 | { |
1622 | void* futex_desc; |
1622 | uint32_t futex_desc; |
1623 | asm_inline( |
1623 | asm_inline( |
1624 | "int $0x40" |
1624 | "int $0x40" |
1625 | : "=a"(futex_desc) |
1625 | : "=a"(futex_desc) |
1626 | : "a"(77), "b"(0), "c"(futex_control_addr) |
1626 | : "a"(77), "b"(0), "c"(futex_ctrl) |
Line 1627... | Line 1627... | ||
1627 | : "memory"); |
1627 | : "memory"); |
Line 1628... | Line 1628... | ||
1628 | return futex_desc; |
1628 | return futex_desc; |
1629 | } |
1629 | } |
1630 | 1630 | ||
1631 | /*============= Function 77, subfunction 1 - destroy futex object =============*/ |
1631 | /*============= Function 77, subfunction 1 - destroy futex object =============*/ |
1632 | 1632 | ||
1633 | KOSAPI int _ksys_futex_destroy(void* futex_desc) |
1633 | KOSAPI int _ksys_futex_destroy(uint32_t futex_desc) |
1634 | { |
1634 | { |
1635 | int res; |
- | |
1636 | asm_inline( |
1635 | int res; |
1637 | "int $0x40" |
1636 | asm_inline( |
Line 1638... | Line 1637... | ||
1638 | : "=a"(res) |
1637 | "int $0x40" |
Line 1639... | Line 1638... | ||
1639 | : "a"(77), "b"(1), "c"(futex_desc) |
1638 | : "=a"(res) |
1640 | : "memory"); |
1639 | : "a"(77), "b"(1), "c"(futex_desc)); |
1641 | return res; |
1640 | return res; |
1642 | } |
1641 | } |
1643 | 1642 | ||
1644 | /*============= Function 77, subfunction 2 - futex wait =============*/ |
1643 | /*============= Function 77, subfunction 2 - futex wait =============*/ |
1645 | 1644 | ||
1646 | KOSAPI int _ksys_futex_wait(void* futex_desc, int control_val, int timeout) |
- | |
1647 | { |
1645 | KOSAPI int _ksys_futex_wait(uint32_t futex_desc, int ctrl_val, int timeout) |
1648 | int res; |
1646 | { |
Line 1649... | Line 1647... | ||
1649 | asm_inline( |
1647 | int res; |
Line 1650... | Line 1648... | ||
1650 | "int $0x40" |
1648 | asm_inline( |
1651 | : "=a"(res) |
1649 | "int $0x40" |
1652 | : "a"(77), "b"(2), "c"(futex_desc), "d"(control_val), "S"(timeout) |
1650 | : "=a"(res) |
1653 | : "memory"); |
1651 | : "a"(77), "b"(2), "c"(futex_desc), "d"(ctrl_val), "S"(timeout)); |
1654 | return res; |
1652 | return res; |
1655 | } |
1653 | } |
1656 | 1654 | ||
1657 | /*============= Function 77, subfunction 3 - futex wake =============*/ |
- | |
1658 | 1655 | /*============= Function 77, subfunction 3 - futex wake =============*/ |
|
1659 | KOSAPI int _ksys_futex_wake(void* futex_desc, int max_wake_count) |
1656 | |
Line 1660... | Line 1657... | ||
1660 | { |
1657 | KOSAPI int _ksys_futex_wake(uint32_t futex_desc, int max_wake_count) |