File tree Expand file tree Collapse file tree 5 files changed +13
-8
lines changed
Expand file tree Collapse file tree 5 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,13 @@ concurrency:
2525
2626jobs :
2727 build :
28- runs-on : macos-15
28+ runs-on : macos-latest
2929 steps :
30+ - name : Xcode Setup
31+ uses : maxim-lobanov/setup-xcode@v1
32+ with :
33+ xcode-version : latest-stable
34+
3035 - name : Checkout
3136 uses : actions/checkout@main
3237 with :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ TARGET = libjailbreak.dylib
22
33CC = clang
44
5- CFLAGS = -framework Foundation -framework CoreServices -framework Security -framework IOKit -framework IOSurface -I../.include -I../_external/modules/litehook/src -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -arch arm64 -arch arm64e -miphoneos-version-min=15.0 -fobjc-arc -dynamiclib -install_name @loader_path/$(TARGET ) -I$(shell brew --prefix) /opt/libarchive/include -g
5+ CFLAGS = -framework Foundation -framework CoreServices -framework Security -framework IOKit -framework IOSurface -I../.include -I../_external/modules/litehook/src -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -arch arm64 -arch arm64e -miphoneos-version-min=15.0 -fobjc-arc -dynamiclib -install_name @loader_path/$(TARGET ) -I$(shell brew --prefix) /opt/libarchive/include -g -O2
66LDFLAGS = -larchive -lbsm -L../.build -lchoma
77
88sign : $(TARGET )
Original file line number Diff line number Diff line change 99// I don't like this as it breaks executing multiple threads at the same time
1010// But as we don't even really do/support that currently anyways, it doesn't matter
1111uint64_t getUserReturnThreadContext (void );
12- extern uint64_t gUserReturnDidHappen ;
12+ extern volatile uint64_t gUserReturnDidHappen ;
1313
1414#ifndef __arm64e__
1515
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ struct tt_level arm_tt_level[4];
1717
1818// Address translation physical <-> virtual
1919
20+ #define PTOV_TABLE_SIZE 8
2021uint64_t phystokv (uint64_t pa )
2122{
22- const uint64_t PTOV_TABLE_SIZE = 8 ;
2323 struct ptov_table_entry {
2424 uint64_t pa ;
2525 uint64_t va ;
Original file line number Diff line number Diff line change @@ -862,23 +862,23 @@ static void* worker_thread(void *arg)
862862}
863863
864864// A thread to alternately spin and sleep.
865+ #define ACTIVITY_WORKER_COUNT 10
865866static void * activity_thread (void * arg )
866867{
867868 volatile uint64_t * runCount = arg ;
868869 struct mach_timebase_info tb ;
869870 mach_timebase_info (& tb );
870871 const unsigned milliseconds = 40 ;
871- const unsigned worker_count = 10 ;
872872 while (* runCount != 0 ) {
873873 // Spin for one period on multiple threads.
874874 uint64_t start = mach_absolute_time ();
875875 uint64_t end = start + milliseconds * 1000 * 1000 * tb .denom / tb .numer ;
876- pthread_t worker [worker_count ];
877- for (unsigned i = 0 ; i < worker_count ; i ++ ) {
876+ pthread_t worker [ACTIVITY_WORKER_COUNT ];
877+ for (unsigned i = 0 ; i < ACTIVITY_WORKER_COUNT ; i ++ ) {
878878 pthread_create (& worker [i ], NULL , worker_thread , & end );
879879 }
880880 worker_thread (& end );
881- for (unsigned i = 0 ; i < worker_count ; i ++ ) {
881+ for (unsigned i = 0 ; i < ACTIVITY_WORKER_COUNT ; i ++ ) {
882882 pthread_join (worker [i ], NULL );
883883 }
884884 // Sleep for one period.
You can’t perform that action at this time.
0 commit comments