Even more of previous
This commit is contained in:
parent
1f2b9c7541
commit
34a968a058
|
@ -492,16 +492,16 @@ system_thread_launch(Thread_Function* proc, void* ptr){
|
||||||
pthread_attr_t thread_attr;
|
pthread_attr_t thread_attr;
|
||||||
pthread_attr_init(&thread_attr);
|
pthread_attr_init(&thread_attr);
|
||||||
int create_result = pthread_create(
|
int create_result = pthread_create(
|
||||||
&thread_info->thread.pthread,
|
&thread_info->thread.pthread,
|
||||||
&thread_attr,
|
&thread_attr,
|
||||||
linux_thread_proc_start,
|
linux_thread_proc_start,
|
||||||
thread_info);
|
thread_info);
|
||||||
|
|
||||||
pthread_attr_destroy(&thread_attr);
|
pthread_attr_destroy(&thread_attr);
|
||||||
|
|
||||||
// TODO(andrew): Need to wait for thread to confirm it launched?
|
// TODO(andrew): Need to wait for thread to confirm it launched?
|
||||||
if (create_result == 0) {
|
if (create_result == 0) {
|
||||||
static_assert(sizeof(Linux_Object*) <= sizeof(System_Thread));
|
static_assert(sizeof(Linux_Object*) <= sizeof(System_Thread), "Linux_Object doesn't fit inside System_Thread");
|
||||||
*(Linux_Object**)&result = thread_info;
|
*(Linux_Object**)&result = thread_info;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -627,7 +627,7 @@ system_condition_variable_free(System_Condition_Variable cv){
|
||||||
internal void*
|
internal void*
|
||||||
system_memory_allocate(u64 size, String_Const_u8 location){
|
system_memory_allocate(u64 size, String_Const_u8 location){
|
||||||
|
|
||||||
static_assert(MEMORY_PREFIX_SIZE >= sizeof(Memory_Annotation_Node));
|
static_assert(MEMORY_PREFIX_SIZE >= sizeof(Memory_Annotation_Node), "MEMORY_PREFIX_SIZE is not enough to contain Memory_Annotation_Node");
|
||||||
u64 adjusted_size = size + MEMORY_PREFIX_SIZE;
|
u64 adjusted_size = size + MEMORY_PREFIX_SIZE;
|
||||||
|
|
||||||
Assert(adjusted_size > size);
|
Assert(adjusted_size > size);
|
||||||
|
@ -713,9 +713,9 @@ system_show_mouse_cursor(i32 show){
|
||||||
linuxvars.cursor_show = show;
|
linuxvars.cursor_show = show;
|
||||||
|
|
||||||
XDefineCursor(
|
XDefineCursor(
|
||||||
linuxvars.dpy,
|
linuxvars.dpy,
|
||||||
linuxvars.win,
|
linuxvars.win,
|
||||||
show ? None : linuxvars.hidden_cursor);
|
show ? None : linuxvars.hidden_cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal b32
|
internal b32
|
||||||
|
|
Loading…
Reference in New Issue