Skip to content

Commit

Permalink
o Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Miller committed Dec 29, 2023
1 parent 2184851 commit a42d01d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static bool reap_if_zombie(struct task *task, struct siginfo_ *info_out, struct


static bool notify_if_stopped(struct task *task, struct siginfo_ *info_out) {
complex_lockt(&task->group->lock, 0);
lock(&task->group->lock, 0);
bool stopped = task->group->stopped;
unlock(&task->group->lock);
if (!stopped || task->group->group_exit_code == 0)
Expand Down
2 changes: 1 addition & 1 deletion kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ static int kill_group(pid_t_ pgid, dword_t sig) {
}
struct tgroup *tgroup;
int err = _EPERM;
struct task* foo = current; // Debugging
//struct task* foo = current; // Debugging
while((task_ref_cnt_get(current, 0) > 1) || (locks_held_count(current))) { // Wait for now, task is in one or more critical sections, and/or has locks
nanosleep(&lock_pause, NULL);
}
Expand Down
1 change: 0 additions & 1 deletion kernel/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ void task_run_current(void) {
}

static void *task_thread(void *task) {

current = task;

update_thread_name();
Expand Down
4 changes: 0 additions & 4 deletions util/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ static inline void sigunwind_end(void) {
void cond_init(cond_t *cond);
void cond_destroy(cond_t *cond);
//static bool is_signal_pending(lock_t *lock); // Not used externally to sync.c, doesn't eneed to be exposed
int wait_for(cond_t *cond, lock_t *lock, struct timespec *timeout);
int wait_for_ignore_signals(cond_t *cond, lock_t *lock, struct timespec *timeout);
void notify(cond_t *cond);
void notify_once(cond_t *cond);
void sigusr1_handler(int sig);
bool current_is_valid(void);

Expand Down

0 comments on commit a42d01d

Please sign in to comment.