Skip to content

Commit

Permalink
proc/process: remove dead code
Browse files Browse the repository at this point in the history
PD-314
  • Loading branch information
HBuczynski authored and HBuczynski committed Nov 18, 2022
1 parent 2d5ec61 commit ca363b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 5 additions & 2 deletions proc/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ typedef struct _process_t {
unsigned lgap : 1;
unsigned rgap : 1;

/*u32 uid;
/* TODO: Process shall keep information permissions */
#if 0
u32 uid;
u32 euid;
u32 suid;
u32 gid;
u32 egid;
u32 sgid;
u32 umask;*/
u32 umask;
#endif

void *ports;

Expand Down
7 changes: 1 addition & 6 deletions proc/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ struct {
thread_t **current;
time_t utcoffs;

unsigned int executions;

/* Synchronized by spinlock */
rbtree_t sleeping;

Expand Down Expand Up @@ -560,8 +558,6 @@ int threads_schedule(unsigned int n, cpu_context_t *context, void *arg)
cpu_sendIPI(0, 32);
}

threads_common.executions++;

current = threads_common.current[hal_cpuGetID()];
threads_common.current[hal_cpuGetID()] = NULL;

Expand All @@ -585,7 +581,7 @@ int threads_schedule(unsigned int n, cpu_context_t *context, void *arg)

LIST_REMOVE(&threads_common.ready[i], selected);

if (!selected->exit /*|| hal_cpuSupervisorMode(selected->context)*/)
if (!selected->exit)
break;

selected->state = GHOST;
Expand Down Expand Up @@ -1862,7 +1858,6 @@ int _threads_init(vm_map_t *kmap, vm_object_t *kernel)
{
unsigned int i;
threads_common.kmap = kmap;
threads_common.executions = 0;
threads_common.ghosts = NULL;
threads_common.reaper = NULL;
threads_common.utcoffs = 0;
Expand Down

0 comments on commit ca363b2

Please sign in to comment.