Even more of previous

This commit is contained in:
Allen Webster 2020-02-19 21:04:52 -08:00
parent 1f2b9c7541
commit 34a968a058
1 changed files with 93 additions and 93 deletions

View File

@ -492,16 +492,16 @@ system_thread_launch(Thread_Function* proc, void* ptr){
pthread_attr_t thread_attr;
pthread_attr_init(&thread_attr);
int create_result = pthread_create(
&thread_info->thread.pthread,
&thread_attr,
linux_thread_proc_start,
thread_info);
&thread_info->thread.pthread,
&thread_attr,
linux_thread_proc_start,
thread_info);
pthread_attr_destroy(&thread_attr);
// TODO(andrew): Need to wait for thread to confirm it launched?
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;
return result;
}
@ -627,7 +627,7 @@ system_condition_variable_free(System_Condition_Variable cv){
internal void*
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;
Assert(adjusted_size > size);
@ -713,9 +713,9 @@ system_show_mouse_cursor(i32 show){
linuxvars.cursor_show = show;
XDefineCursor(
linuxvars.dpy,
linuxvars.win,
show ? None : linuxvars.hidden_cursor);
linuxvars.dpy,
linuxvars.win,
show ? None : linuxvars.hidden_cursor);
}
internal b32