source: rtems/c/src/librtems++/src/rtemsEvent.cc @ f68401e

4.115
Last change on this file since f68401e was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2  ------------------------------------------------------------------------
3
4  COPYRIGHT (c) 1997
5  Objective Design Systems Ltd Pty (ODS)
6  All rights reserved (R) Objective Design Systems Ltd Pty
7 
8  The license and distribution terms for this file may be found in the
9  file LICENSE in this distribution or at
10  http://www.rtems.com/license/LICENSE.
11
12  ------------------------------------------------------------------------
13
14  See header file.
15
16  ------------------------------------------------------------------------
17*/
18
19#include <rtems++/rtemsEvent.h>
20
21/* ----
22    rtemsEvent
23*/
24
25rtemsEvent::rtemsEvent(const char *name_str, uint32_t node)
26  : name(rtems_build_name('S', 'E', 'L', 'F')),
27    id(RTEMS_SELF)
28{
29  connect(name_str, node);
30}
31
32rtemsEvent::rtemsEvent(const rtemsEvent& event)
33{
34  name = event.name;
35  id = event.id;
36}
37
38rtemsEvent::rtemsEvent()
39  : name(rtems_build_name('S', 'E', 'L', 'F')),
40    id(RTEMS_SELF)
41{
42}
43
44rtemsEvent::~rtemsEvent()
45{
46}
47
48const rtemsEvent& rtemsEvent::operator=(const rtemsEvent& event)
49{
50  name = event.name;
51  id = event.id;
52
53  return *this;
54}
55
56const rtems_status_code rtemsEvent::connect(const char *name_str,
57                                            const uint32_t node)
58{
59  name = rtems_build_name(name_str[0],
60                          name_str[1],
61                          name_str[2],
62                          name_str[3]);
63 
64  set_status_code(rtems_task_ident(name, node, &id));
65
66  if (unsuccessful())
67  {
68    name = rtems_build_name('S', 'E', 'L', 'F');
69    id = RTEMS_SELF;
70  }
71 
72  return last_status_code();
73}
Note: See TracBrowser for help on using the repository browser.