mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 12:18:15 +00:00
Minor changes to futex implementation on Linux
This commit is contained in:
+4
-2
@@ -1241,7 +1241,7 @@ gb_internal bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, T
|
|||||||
}
|
}
|
||||||
case Type_Pointer:
|
case Type_Pointer:
|
||||||
if (source->kind == Type_Pointer) {
|
if (source->kind == Type_Pointer) {
|
||||||
isize level = check_is_assignable_to_using_subtype(source->Pointer.elem, poly->Pointer.elem);
|
isize level = check_is_assignable_to_using_subtype(source->Pointer.elem, poly->Pointer.elem, /*level*/0, /*src_is_ptr*/false, /*allow_polymorphic*/true);
|
||||||
if (level > 0) {
|
if (level > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1413,7 +1413,9 @@ gb_internal bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, T
|
|||||||
return ok;
|
return ok;
|
||||||
|
|
||||||
}
|
}
|
||||||
// return check_is_assignable_to(c, &o, poly);
|
|
||||||
|
// NOTE(bill): Check for subtypes of
|
||||||
|
// return check_is_assignable_to(c, &o, poly); // && is_type_subtype_of_and_allow_polymorphic(o.type, poly);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case Type_Tuple:
|
case Type_Tuple:
|
||||||
|
|||||||
+1
-1
@@ -656,7 +656,7 @@ gb_internal void futex_wait(Futex *addr, Footex val) {
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
int ret = syscall(SYS_futex, addr, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, val, NULL, NULL, 0);
|
int ret = syscall(SYS_futex, addr, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, val, NULL, NULL, 0);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN && errno != EINTR) {
|
||||||
perror("Futex wait");
|
perror("Futex wait");
|
||||||
GB_PANIC("Failed in futex wait!\n");
|
GB_PANIC("Failed in futex wait!\n");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user