void set_priority( hthread_t th, Hint pri ) { Hint status; struct sched_param pr; pr.sched_priority = pri; status = hthread_setschedparam( th, SCHED_OTHER, &pr ); if( status < 0 ) DEBUG_PRINTF("ERROR: (OP=SET PRIORITY) (STA=0x%8.8x)\n",status); }
Hint thread_setpriority( hthread_t th, Hint pri ) { Hint status; struct sched_param pr; pr.sched_priority = pri; status = hthread_setschedparam( th, SCHED_OTHER, &pr ); if( status < 0 ) DEBUG_PRINTF("SET PRIORITY ERROR: 0x%8.8x\n", status); return status; }
/*-------------------------------------------------------------------*/ static int hthread_setschedprio( TID tid, int prio ) { int rc; struct sched_param param; memset( ¶m, 0, sizeof( param )); if (equal_threads(tid,0)) tid = thread_id(); param.sched_priority = prio; rc = hthread_setschedparam( tid, herc_policy, ¶m ); return rc; }
// Set the priority of the given thread. void set_priority( hthread_t th, Hint pri ) { Hint status; struct sched_param pr; pr.sched_priority = pri; status = hthread_setschedparam( th, SCHED_OTHER, &pr ); if( status < 0 ) { printf( "Set Priority Error: 0x%8.8x\n", status ); } }