Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions kernel/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,25 @@
#include <linux/sched/task.h>
#include <linux/idr.h>

#include <mach/mach.h>


bool *bTfp0 = nil; // boolean that can be defined later in an installation preference?

/*
NSDictionary *bundle = [[NSUserDefaults standardUserDefaults] persistentDomainForName:@"xxx"];

id tfp0 = [bundle valueForKey:@"tfp0"];
bool bTfp0 = [tfp0 bool];
*/

if (bTfp0) {
int main(void) {
mach_port_t kernel_task = 0;
return task_for_pid(mach_task_self(), 0, &kernel_task);
}
}

struct pid init_struct_pid = {
.count = ATOMIC_INIT(1),
.tasks = {
Expand Down