4.115
Last change
on this file since 77998753 was
77998753,
checked in by Sebastian Huber <sebastian.huber@…>, on 02/17/12 at 15:54:23
|
Use alternative API
Replaced Allocate_majority_of_workspace() with
rtems_workspace_allocate(). Replaced Allocate_majority_of_heap() with
rtems_heap_greedy_allocate().
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-1999. |
---|
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.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #ifdef HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #define CONFIGURE_INIT |
---|
17 | #include "system.h" |
---|
18 | #include <errno.h> |
---|
19 | #include "tmacros.h" |
---|
20 | |
---|
21 | void Key_destructor( |
---|
22 | void *key_data |
---|
23 | ) |
---|
24 | { |
---|
25 | } |
---|
26 | |
---|
27 | |
---|
28 | void *POSIX_Init( |
---|
29 | void *argument |
---|
30 | ) |
---|
31 | { |
---|
32 | int status; |
---|
33 | |
---|
34 | puts( "\n\n*** POSIX KEY 01 TEST ***" ); |
---|
35 | |
---|
36 | /* set the time of day, and print our buffer in multiple ways */ |
---|
37 | |
---|
38 | set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 ); |
---|
39 | |
---|
40 | /* get id of this thread */ |
---|
41 | |
---|
42 | Init_id = pthread_self(); |
---|
43 | printf( "Init's ID is 0x%08" PRIxpthread_t "\n", Init_id ); |
---|
44 | |
---|
45 | rtems_workspace_greedy_allocate( 0 ); |
---|
46 | |
---|
47 | puts("Init: pthread_key_create - ENOMEM (Workspace not available)"); |
---|
48 | empty_line(); |
---|
49 | status = pthread_key_create( &Key_id[0], Key_destructor ); |
---|
50 | fatal_directive_check_status_only( status, ENOMEM, "no workspace available" ); |
---|
51 | |
---|
52 | puts( "*** END OF POSIX KEY 01 TEST ***" ); |
---|
53 | rtems_test_exit( 0 ); |
---|
54 | |
---|
55 | return NULL; /* just so the compiler thinks we returned something */ |
---|
56 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.