source: rtems/cpukit/rtems/src/eventsend.c @ 57c676c6

5
Last change on this file since 57c676c6 was e266d13, checked in by Sebastian Huber <sebastian.huber@…>, on 05/20/16 at 13:10:27

Replace *_Get_interrupt_disable() with *_Get()

Uniformly use *_Get() to get an object by identifier with a lock
context.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief Sends an Event Set to the Target Task
5 *  @ingroup ClassicEvent
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18  #include "config.h"
19#endif
20
21#include <rtems/rtems/eventimpl.h>
22#include <rtems/rtems/tasks.h>
23#include <rtems/score/threadimpl.h>
24
25rtems_status_code rtems_event_send(
26  rtems_id        id,
27  rtems_event_set event_in
28)
29{
30  Thread_Control    *the_thread;
31  RTEMS_API_Control *api;
32  ISR_lock_Context   lock_context;
33
34  the_thread = _Thread_Get( id, &lock_context );
35
36  if ( the_thread == NULL ) {
37#if defined(RTEMS_MULTIPROCESSING)
38    return _Event_MP_Send( id, event_in );
39#else
40    return RTEMS_INVALID_ID;
41#endif
42  }
43
44  api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
45  return _Event_Surrender(
46    the_thread,
47    event_in,
48    &api->Event,
49    THREAD_WAIT_CLASS_EVENT,
50    &lock_context
51  );
52}
Note: See TracBrowser for help on using the repository browser.