4.104.114.95
Last change
on this file since 26f5aa0 was
5c980d0,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/05/08 at 14:48:37
|
2008-09-05 Joel Sherrill <joel.sherrill@…>
- libchip/Makefile.am, libchip/shmdr/init.c, libchip/shmdr/mpisr.c,
libchip/shmdr/poll.c, libchip/shmdr/shm_driver.h: Update shared
memory driver to not use the clock ioctl to install a method to poll
for input. It now uses a Class API Timer which means we can eliminate
this special IOCTL from all clock drivers.
- libchip/shmdr/setckvec.c: Removed.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * This routine polls to see if a packet has arrived. If one |
---|
3 | * has it informs the executive. It uses a Classic API Timer |
---|
4 | * |
---|
5 | * COPYRIGHT (c) 1989-2008. |
---|
6 | * On-Line Applications Research Corporation (OAR). |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.rtems.com/license/LICENSE. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems.h> |
---|
16 | #include <rtems/score/sysstate.h> |
---|
17 | #include <rtems/libio.h> |
---|
18 | |
---|
19 | #include <assert.h> |
---|
20 | |
---|
21 | #include "shm_driver.h" |
---|
22 | |
---|
23 | rtems_timer_service_routine Shm_Poll_TSR( |
---|
24 | rtems_id id, |
---|
25 | void *ignored_address |
---|
26 | ) |
---|
27 | { |
---|
28 | uint32_t tmpfront; |
---|
29 | |
---|
30 | /* |
---|
31 | * This should NEVER happen but just in case. |
---|
32 | */ |
---|
33 | if (!_System_state_Is_up(_System_state_Get())) |
---|
34 | return; |
---|
35 | |
---|
36 | tmpfront = Shm_Local_receive_queue->front; |
---|
37 | if ( Shm_Convert(tmpfront) != Shm_Locked_queue_End_of_list ) { |
---|
38 | rtems_multiprocessing_announce(); |
---|
39 | Shm_Interrupt_count++; |
---|
40 | } |
---|
41 | |
---|
42 | (void) rtems_timer_reset( id ); |
---|
43 | } |
---|
44 | |
---|
45 | void Shm_install_timer(void) |
---|
46 | { |
---|
47 | rtems_id id; |
---|
48 | rtems_status_code status; |
---|
49 | |
---|
50 | status = rtems_timer_create( rtems_build_name( 'S', 'H', 'P', 'L' ), &id ); |
---|
51 | assert( !status ); |
---|
52 | |
---|
53 | status = rtems_timer_fire_after( id, 1, Shm_Poll_TSR, NULL ); |
---|
54 | assert( !status ); |
---|
55 | } |
---|
56 | |
---|
Note: See
TracBrowser
for help on using the repository browser.