Skip to content

Commit

Permalink
lone: handle more obscure auxvec types last
Browse files Browse the repository at this point in the history
Write the more common types first.
Makes the code more readable.
  • Loading branch information
matheusmoreira committed Dec 3, 2023
1 parent e90e45e commit 6fb578a
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions source/lone/modules/intrinsic/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,44 +156,44 @@ static void lone_auxiliary_value_to_table(struct lone_lisp *lone, struct lone_va
break;
#endif

#ifdef AT_MINSIGSTKSZ
case AT_MINSIGSTKSZ:
key = lone_intern_c_string(lone, "minimum-signal-delivery-stack-size");
#ifdef AT_CLKTCK
case AT_CLKTCK:
key = lone_intern_c_string(lone, "clock-tick");
value = lone_integer_create(lone, auxiliary->value.as.integer);
break;
#endif

#ifdef AT_RSEQ_FEATURE_SIZE
case AT_RSEQ_FEATURE_SIZE:
key = lone_intern_c_string(lone, "restartable-sequences-supported-feature-size");
value = lone_integer_create(lone, auxiliary->value.as.integer);
#ifdef AT_RANDOM
case AT_RANDOM:
key = lone_intern_c_string(lone, "random");
value = lone_bytes_create(lone, auxiliary->value.as.pointer, 16);
break;
#endif

#ifdef AT_RSEQ_ALIGN
case AT_RSEQ_ALIGN:
key = lone_intern_c_string(lone, "restartable-sequences-allocation-alignment");
#ifdef AT_SECURE
case AT_SECURE:
key = lone_intern_c_string(lone, "secure");
value = lone_integer_create(lone, auxiliary->value.as.integer);
break;
#endif

#ifdef AT_CLKTCK
case AT_CLKTCK:
key = lone_intern_c_string(lone, "clock-tick");
#ifdef AT_MINSIGSTKSZ
case AT_MINSIGSTKSZ:
key = lone_intern_c_string(lone, "minimum-signal-delivery-stack-size");
value = lone_integer_create(lone, auxiliary->value.as.integer);
break;
#endif

#ifdef AT_RANDOM
case AT_RANDOM:
key = lone_intern_c_string(lone, "random");
value = lone_bytes_create(lone, auxiliary->value.as.pointer, 16);
#ifdef AT_RSEQ_FEATURE_SIZE
case AT_RSEQ_FEATURE_SIZE:
key = lone_intern_c_string(lone, "restartable-sequences-supported-feature-size");
value = lone_integer_create(lone, auxiliary->value.as.integer);
break;
#endif

#ifdef AT_SECURE
case AT_SECURE:
key = lone_intern_c_string(lone, "secure");
#ifdef AT_RSEQ_ALIGN
case AT_RSEQ_ALIGN:
key = lone_intern_c_string(lone, "restartable-sequences-allocation-alignment");
value = lone_integer_create(lone, auxiliary->value.as.integer);
break;
#endif
Expand Down

0 comments on commit 6fb578a

Please sign in to comment.