rem: if (sig < 1 || sig > MAX_SIGNO)
add: if (signal < 1 || signal > MAX_SIGNO)
context: send_signal_etc(pid_t team, uint sig, uint32 flags){	struct thread *thread;	cpu_status state;	if (sig < 1 || sig > MAX_SIGNO)		return B_BAD_VALUE;	state = disable_interrupts();	GRAB_THREAD_LOCK();	thread = thread_get_thread_struct_locked(team);	if (!thread) {		RELEASE_THREAD_LOCK();		restore_interrupts(state);		return B_BAD_THREAD_ID;	}	// XXX check permission	// Signals to kernel threads will only wake them up	if (thread->team == team_get_kernel_team()) {		if (thread->state == B_THREAD_SUSPENDED) {			thread->state = thread->next_state = B_THREAD_READY;			scheduler_enqueue_in_run_queue(thread);		}	}	else {		thread->sig_pending |= (1L << (sig - 1));		switch (sig) {			case SIGKILL:			{				struct thread *mainThread = thread->team->main_thread;				// Forward KILLTHR to the main thread of the team				mainThread->sig_pending |= (1L << (SIGKILLTHR - 1));				// Wake up main thread				if (mainThread->state == B_THREAD_SUSPENDED) {					mainThread->state = mainThread->next_state = B_THREAD_READY;					scheduler_enqueue_in_run_queue(mainThread);				} else if (mainThread->state == B_THREAD_WAITING)					sem_interrupt_thread(mainThread);				// Supposed to fall through			}			case SIGKILLTHR:				// Wake up suspended threads and interrupt waiting ones				if (thread->state == B_THREAD_SUSPENDED) {					thread->state = thread->next_state = B_THREAD_READY;					scheduler_enqueue_in_run_queue(thread);				} else if (thread->state == B_THREAD_WAITING)					sem_interrupt_thread(thread);				break;			case SIGCONT:				// Wake up thread if it was suspended				if (thread->state == B_THREAD_SUSPENDED) {					thread->state = thread->next_state = B_THREAD_READY;					scheduler_enqueue_in_run_queue(thread);				}				break;			default:				if (thread->sig_pending & ((~thread->sig_block_mask) | (1L << (SIGCHLD - 1)))) {					// Interrupt thread if it was waiting					if (thread->state == B_THREAD_WAITING)						sem_interrupt_thread(thread);				}				break;		}	}		if (!(flags & B_DO_NOT_RESCHEDULE))		scheduler_reschedule();	RELEASE_THREAD_LOCK();	restore_interrupts(state);		return B_OK;}