Changeset 29cacfd in rtems


Ignore:
Timestamp:
Feb 10, 2014, 6:30:39 PM (6 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, master
Children:
185e46f
Parents:
039a189d
git-author:
Jennifer Averett <jennifer.averett@…> (02/10/14 18:30:39)
git-committer:
Jennifer Averett <jennifer.averett@…> (03/07/14 15:10:01)
Message:

rtems: Add Classic API get and set affinity methods.

Add the following methods:

+ rtems_task_get_affinity
+ rtems_task_set_affinity

Location:
cpukit/rtems
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    r039a189d r29cacfd  
    270270endif
    271271
     272## SMP Files
     273if HAS_SMP
     274librtems_a_SOURCES += src/tasksetaffinity.c
     275librtems_a_SOURCES += src/taskgetaffinity.c
     276endif
     277
     278
    272279include $(srcdir)/preinstall.am
    273280include $(top_srcdir)/automake/local.am
  • cpukit/rtems/include/rtems/rtems/tasks.h

    r039a189d r29cacfd  
    491491);
    492492
     493#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
     494/**
     495 *  @brief RTEMS Get Task Affinity
     496 *
     497 *  This directive returns the cpuset for the
     498 *  given task.  The cpuset size must be the
     499 *  same size as the task affinity set size.
     500 *
     501 * @param[in] id is the thread to extract
     502 * @param[in] cpusetsize is the size of the cpuset
     503 * @param[out] cpuset is the tasks affinity cpuset
     504 *
     505 * @retval RTEMS_SUCCESSFUL if successful or error code if unsuccessful
     506 * @retval RTEMS_INVALID_ADDRESS if cpuset is NULL
     507 * @retval RTEMS_INVALID_NUMBER if cpusetsize is incorrect
     508 * @retval RTEMS_INVALID_ID if id not valid
     509 */
     510rtems_status_code rtems_task_get_affinity(
     511  rtems_id             id,
     512  size_t               cpusetsize,
     513  cpu_set_t           *cpuset
     514);
     515
     516/**
     517 *  @brief RTEMS Set Task Affinity
     518 *
     519 *  This directive sets the given tasks
     520 *  affinity cpuset.
     521 *
     522 * @param[in] id is the thread to extract
     523 * @param[in] cpusetsize is the size of the cpuset
     524 * @param[in] cpuset is affinity set to assign to the task
     525 *
     526 * @retval RTEMS_SUCCESSFUL if successful or error code if unsuccessful
     527 * @retval RTEMS_INVALID_ADDRESS if cpuset is NULL
     528 * @retval RTEMS_INVALID_NUMBER if cpuset or cpusetsize is incorrect
     529 * @retval RTEMS_INVALID_ID if id not valid
     530 */
     531rtems_status_code rtems_task_set_affinity(
     532  rtems_id             id,
     533  size_t               cpusetsize,
     534  cpu_set_t           *cpuset
     535);
     536#endif
     537
    493538/**
    494539 *  @brief RTEMS Get Self Task Id
Note: See TracChangeset for help on using the changeset viewer.