Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
/*-------------------------------------------------------------------*/
static int  hthread_setschedprio( TID tid, int prio )
{
    int rc;
    struct sched_param param;
    memset( &param, 0, sizeof( param ));
    if (equal_threads(tid,0))
        tid = thread_id();
    param.sched_priority = prio;
    rc = hthread_setschedparam( tid, herc_policy, &param );
    return rc;
}
Exemplo n.º 4
0
// 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 );
    }
}