thr_setschedparam.c (26f52e2f8b92ffea807005dc15866b2cf79ed3ac) | thr_setschedparam.c (7d9d7ca2ed3e3d630e63482c41f2d26194129c2c) |
---|---|
1/* 2 * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37#include "thr_private.h" 38 39__weak_reference(_pthread_setschedparam, pthread_setschedparam); 40 41int 42_pthread_setschedparam(pthread_t pthread, int policy, 43 const struct sched_param *param) 44{ | 1/* 2 * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37#include "thr_private.h" 38 39__weak_reference(_pthread_setschedparam, pthread_setschedparam); 40 41int 42_pthread_setschedparam(pthread_t pthread, int policy, 43 const struct sched_param *param) 44{ |
45 int old_prio, in_readyq = 0, ret = 0; | 45 int old_prio, ret = 0; 46#if 0 47 int in_readyq = 0; 48#endif |
46 47 if ((param == NULL) || (policy < SCHED_FIFO) || (policy > SCHED_RR)) 48 return (EINVAL); 49 50 if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || 51 (param->sched_priority > PTHREAD_MAX_PRIORITY)) 52 return (ENOTSUP); 53 --- 60 unchanged lines hidden --- | 49 50 if ((param == NULL) || (policy < SCHED_FIFO) || (policy > SCHED_RR)) 51 return (EINVAL); 52 53 if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || 54 (param->sched_priority > PTHREAD_MAX_PRIORITY)) 55 return (ENOTSUP); 56 --- 60 unchanged lines hidden --- |