Changeset 2bafb960 in rtems


Ignore:
Timestamp:
Dec 21, 2013, 3:44:12 AM (5 years ago)
Author:
Daniel Ramirez <javamonn@…>
Branches:
4.11, master
Children:
3d6e174
Parents:
1464599
git-author:
Daniel Ramirez <javamonn@…> (12/21/13 03:44:12)
git-committer:
Gedare Bloom <gedare@…> (12/22/13 01:09:02)
Message:

rtems: classic api to/from core priority conversions

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/capture/capture.c

    r1464599 r2bafb960  
    2828#include <stdlib.h>
    2929#include <string.h>
     30#include <rtems/rtems/tasksimpl.h>
    3031
    3132#include "capture.h"
     
    434435  task->tcb->extensions[capture_extension_index] = task;
    435436
    436   task->start_priority = new_task->Start.initial_priority;
     437  task->start_priority = _RTEMS_tasks_Priority_from_Core(
     438                           new_task->Start.initial_priority
     439                         );
    437440  task->stack_size     = new_task->Start.Initial_stack.size;
    438441  task->stack_clean    = task->stack_size;
  • cpukit/rtems/include/rtems/rtems/tasksimpl.h

    r1464599 r2bafb960  
    117117
    118118/**
     119 *  @brief Converts a core priority into an RTEMS API priority.
     120 *
     121 *  This function converts a core priority into an RTEMS API priority.
     122 */
     123RTEMS_INLINE_ROUTINE rtems_task_priority _RTEMS_tasks_Priority_from_Core (
     124  Priority_Control priority
     125)
     126{
     127  return (rtems_task_priority) priority;
     128}
     129
     130/**
    119131 *  @brief Checks whether the priority is a valid user task.
    120132 *
  • cpukit/rtems/src/semcreate.c

    r1464599 r2bafb960  
    2626#include <rtems/rtems/options.h>
    2727#include <rtems/rtems/semimpl.h>
     28#include <rtems/rtems/tasksimpl.h>
    2829#include <rtems/score/coremuteximpl.h>
    2930#include <rtems/score/coresemimpl.h>
     
    157158
    158159    if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
    159       the_mutex_attr.priority_ceiling      = priority_ceiling;
     160      the_mutex_attr.priority_ceiling      = _RTEMS_tasks_Priority_to_Core(
     161                                               priority_ceiling
     162                                             );
    160163      the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
    161164      the_mutex_attr.only_owner_release    = false;
  • cpukit/rtems/src/taskmp.c

    r1464599 r2bafb960  
    8181  RTEMS_tasks_MP_Remote_operations operation,
    8282  Objects_Id                       task_id,
    83   rtems_task_priority                 new_priority,
     83  rtems_task_priority              new_priority,
    8484  uint32_t                         notepad,
    8585  uint32_t                         note
  • cpukit/rtems/src/tasksetpriority.c

    r1464599 r2bafb960  
    4343    case OBJECTS_LOCAL:
    4444      /* XXX need helper to "convert" from core priority */
    45       *old_priority = the_thread->current_priority;
     45      *old_priority = _RTEMS_tasks_Priority_from_Core(
     46                        the_thread->current_priority
     47                      );
    4648      if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
    47         the_thread->real_priority = new_priority;
     49        the_thread->real_priority = _RTEMS_tasks_Priority_to_Core(
     50                                      new_priority
     51                                    );
    4852        if ( the_thread->resource_count == 0 ||
    4953             the_thread->current_priority > new_priority )
Note: See TracChangeset for help on using the changeset viewer.