5,9 → 5,9 |
* Created by turbocat (Maxim Logaev) 2021. |
*/ |
|
#include <sys/ksys.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <sys/ksys.h> |
|
#define TH_STACK_SIZE 1024 |
|
20,7 → 20,8 |
|
extern int main(); |
|
void redraw_window(void){ |
void redraw_window(void) |
{ |
ksys_pos_t mouse_pos = _ksys_get_mouse_pos(KSYS_MOUSE_SCREEN_POS); |
_ksys_start_draw(); |
_ksys_create_window(mouse_pos.x, mouse_pos.y, 140, 60, "Threads", sys_colors.work_area, 0x14); |
29,7 → 30,8 |
_ksys_end_draw(); |
} |
|
void create_thread(void){ |
void create_thread(void) |
{ |
unsigned tid; // New thread ID |
void *th_stack = malloc(TH_STACK_SIZE); // Allocate memory for thread stack |
if(!th_stack){ |
44,7 → 46,8 |
debug_printf("New thread created (TID=%u)\n", tid); |
} |
|
int main(){ |
int main() |
{ |
_ksys_get_system_colors(&sys_colors); |
int gui_event; |
redraw_window(); |