rem: if(t->state == THREAD_STATE_READY && t->priority != priority) {
add: if(t->state == B_THREAD_READY && t->priority != priority) {
context: int thread_set_priority(thread_id id, int priority){	struct thread *t;	int retval;	// make sure the passed in priority is within bounds	if(priority > THREAD_MAX_PRIORITY)		priority = THREAD_MAX_PRIORITY;	if(priority < THREAD_MIN_PRIORITY)		priority = THREAD_MIN_PRIORITY;	t = thread_get_current_thread();	if(t->id == id) {		// it's ourself, so we know we aren't in a run queue, and we can manipulate		// our structure directly		t->priority = priority;		retval = B_NO_ERROR;	} else {		int state = disable_interrupts();		GRAB_THREAD_LOCK();		t = thread_get_thread_struct_locked(id);		if(t) {			if(t->state == THREAD_STATE_READY && t->priority != priority) {				// this thread is in a ready queue right now, so it needs to be reinserted				thread_dequeue_id(&run_q[t->priority], t->id);				t->priority = priority;				thread_enqueue_run_q(t);			} else {				t->priority = priority;			}			retval = B_NO_ERROR;		} else {			retval = ERR_INVALID_HANDLE;		}		RELEASE_THREAD_LOCK();		restore_interrupts(state);	}	return retval;}