|
0
|
1 /* thread-packets.h - |
|
|
2 Optional packet processing for thread aware debugging. |
|
|
3 Externs as called by central packet switch routine |
|
|
4 */ |
|
|
5 |
|
|
6 /* |
|
2
|
7 * Copyright (c) 1998,1999 Cygnus Solutions |
|
0
|
8 * |
|
|
9 * The authors hereby grant permission to use, copy, modify, distribute, |
|
|
10 * and license this software and its documentation for any purpose, provided |
|
|
11 * that existing copyright notices are retained in all copies and that this |
|
|
12 * notice is included verbatim in any distributions. No written agreement, |
|
|
13 * license, or royalty fee is required for any of the authorized uses. |
|
|
14 * Modifications to this software may be copyrighted by their authors |
|
|
15 * and need not follow the licensing terms described here, provided that |
|
|
16 * the new terms are clearly indicated on the first page of each file where |
|
|
17 * they apply. |
|
|
18 */ |
|
|
19 |
|
|
20 /* The DEBUG_THREADS flag is usually set in board.h */ |
|
|
21 |
|
|
22 #if DEBUG_THREADS /* activate this in board.h */ |
|
|
23 |
|
2
|
24 /* export the thread id's sent by gdb: */ |
|
|
25 extern int _gdb_cont_thread, _gdb_general_thread ; |
|
|
26 |
|
|
27 extern char * stub_pack_Tpkt_threadid(char * pkt) ; |
|
|
28 |
|
|
29 extern long stub_get_currthread(void) ; |
|
|
30 extern int stub_lock_scheduler(int lock, int kind, long id) ; |
|
|
31 |
|
0
|
32 extern void stub_pkt_changethread(char * inbuf, |
|
2
|
33 char * outbuf, |
|
|
34 int bufmax) ; |
|
0
|
35 |
|
|
36 |
|
|
37 extern void stub_pkt_getthreadlist(char * inbuf, |
|
2
|
38 char * outbuf, |
|
|
39 int bufmax) ; |
|
0
|
40 |
|
|
41 |
|
|
42 extern void stub_pkt_getthreadinfo( |
|
2
|
43 char * inbuf, |
|
|
44 char * outbuf, |
|
|
45 int bufmax) ; |
|
0
|
46 |
|
|
47 extern void stub_pkt_thread_alive( |
|
2
|
48 char * inbuf, |
|
|
49 char * outbuf, |
|
|
50 int bufmax) ; |
|
0
|
51 |
|
|
52 extern void stub_pkt_currthread( |
|
2
|
53 char * inbuf, |
|
|
54 char * outbuf, |
|
|
55 int bufmax) ; |
|
0
|
56 |
|
2
|
57 #define STUB_PKT_GETTHREADLIST(A,B,C) { stub_pkt_getthreadlist(A,B,C); } |
|
|
58 #define STUB_PKT_GETTHREADINFO(A,B,C) { stub_pkt_getthreadinfo(A,B,C); } |
|
|
59 #define STUB_PKT_CHANGETHREAD(A,B,C) { stub_pkt_changethread(A,B,C); } |
|
|
60 #define STUB_PKT_THREAD_ALIVE(A,B,C) { stub_pkt_thread_alive(A,B,C); } |
|
|
61 #define STUB_PKT_CURRTHREAD(A,B,C) { stub_pkt_currthread(A,B,C); } |
|
|
62 #define PACK_THREAD_ID(PTR) { PTR = stub_pack_Tpkt_threadid (PTR); } |
|
0
|
63 #else |
|
2
|
64 #define STUB_PKT_GETTHREADLIST(A,B,C) {} |
|
|
65 #define STUB_PKT_GETTHREADINFO(A,B,C) {} |
|
|
66 #define STUB_PKT_CHANGETHREAD(A,B,C) {} |
|
|
67 #define STUB_PKT_THREAD_ALIVE(A,B,C) {} |
|
|
68 #define STUB_PKT_CURRTHREAD(A,B,C) {} |
|
|
69 #define PACK_THREAD_ID(PTR) {} |
|
0
|
70 #endif |