source: rtems/testsuites/sptests/spnotepad01/init.c @ 3ac68119

4.11
Last change on this file since 3ac68119 was 3ac68119, checked in by Gedare Bloom <gedare@…>, on Mar 6, 2015 at 5:41:49 PM

cpukit: deprecate notepads

Deprecate Classic API Notepads. Mark task_set/get_note() with
the deprecated attribute, and also mark the notepads field.

Replace disable with enable option for notepads in confdefs.h,
and make notepads disabled by default. The previous option
CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is now unused and
will emit a compile-time warning. A new option
CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is available to turn
on notepads, but it also will emit a compile-time warning
to indicate that notepads are deprecated.

Closes #2265

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2009.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include "tmacros.h"
15
16const char rtems_test_name[] = "SPNOTEPAD 1";
17
18/* forward declarations to avoid warnings */
19rtems_task Init(rtems_task_argument argument);
20
21rtems_task Init(
22  rtems_task_argument ignored
23)
24{
25  rtems_status_code status;
26  uint32_t          note;
27
28  TEST_BEGIN();
29
30  puts( "Init - rtems_task_get_note - RTEMS_NOT_CONFIGURED" );
31  status = rtems_task_get_note( rtems_task_self(), 0, &note );
32  fatal_directive_status(
33    status,
34    RTEMS_NOT_CONFIGURED,
35    "rtems_task_get_note not configured"
36  );
37
38  puts( "Init - rtems_task_set_note - RTEMS_NOT_CONFIGURED" );
39  status = rtems_task_set_note( rtems_task_self(), 0, 1 );
40  fatal_directive_status(
41    status,
42    RTEMS_NOT_CONFIGURED,
43    "rtems_task_set_note not configured"
44  );
45
46  TEST_END();
47
48  rtems_test_exit(0);
49}
50
51/* configuration information */
52
53#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
54#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
55
56#define CONFIGURE_MAXIMUM_TASKS         1
57#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
58
59#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
60
61#define CONFIGURE_INIT
62
63#include <rtems/confdefs.h>
64
65/* global variables */
Note: See TracBrowser for help on using the repository browser.