Update of /cvsroot/linux-hls/hls/simul/include
In directory sc8-pr-cvs1:/tmp/cvs-serv14351/simul/include
Modified Files:
bitfields.h event.h heap.h interface-data.h interface-funcs.h
os.h sim.h
Log Message:
- Some cleanup & code reorganization
- Fix the simulator's compilation
- Better logging macros for the simulator backend
Index: bitfields.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/bitfields.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** bitfields.h 25 Feb 2003 09:18:58 -0000 1.3
--- bitfields.h 29 Nov 2003 09:11:35 -0000 1.4
***************
*** 9,12 ****
--- 9,15 ----
*/
+ #ifndef __BITFIELDS_H__
+ #define __BITFIELDS_H__
+
/* This is clearly a hack! */
extern unsigned char KiFindLeftNibbleBitTable[];
***************
*** 41,43 ****
} /*lint --e(717)*/ while (0);
!
--- 44,46 ----
} /*lint --e(717)*/ while (0);
! #endif /* __BITFIELDS_H__ */
Index: event.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/event.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** event.h 25 Feb 2003 09:18:58 -0000 1.4
--- event.h 29 Nov 2003 09:11:35 -0000 1.5
***************
*** 9,12 ****
--- 9,15 ----
*/
+ #ifndef __EVENT_H__
+ #define __EVENT_H__
+
#define EVENT_TYPE_INITIALIZE 1
#define EVENT_TYPE_SHUTDOWN 2
***************
*** 57,59 ****
struct sim_event *new_event(int type, int proc);
void insert_event(struct sim_event *event, long long int etime);
! long long int process_event(struct eventq_elt *eq);
--- 60,63 ----
struct sim_event *new_event(int type, int proc);
void insert_event(struct sim_event *event, long long int etime);
!
! #endif /* __EVENT_H__ */
Index: heap.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/heap.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** heap.h 25 Feb 2003 09:18:58 -0000 1.3
--- heap.h 29 Nov 2003 09:11:35 -0000 1.4
***************
*** 9,12 ****
--- 9,15 ----
*/
+ #ifndef __HEAP_H__
+ #define __HEAP_H__
+
struct eventq_elt {
long long int key;
***************
*** 23,24 ****
--- 26,31 ----
void event_list_insert(long long int key, void *ptr);
void event_list_remove(void *ptr);
+
+ long long int process_event(struct eventq_elt *eq);
+
+ #endif /* __HEAP_H__ */
Index: interface-data.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/interface-data.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** interface-data.h 25 Feb 2003 09:18:58 -0000 1.3
--- interface-data.h 29 Nov 2003 09:11:35 -0000 1.4
***************
*** 18,22 ****
--- 18,26 ----
typedef long long _int64;
+ #if 0
typedef _int64 WNT_TIME; /* FIXME: This must be removed! */
+ #else
+ typedef long int WNT_TIME; /* FIXME: This must be removed! */
+ #endif
#define MAXIMUM_PROCESSORS 32
***************
*** 24,28 ****
#define PROCT ULONG
#define KPRIORITY int
! #define MAXIMUM_PRIORITY 32 /* FIXME: Shouldn't this go in rr.h??? */
#define CONTAINING_RECORD(address, type, field) ((type *)( \
--- 28,32 ----
#define PROCT ULONG
#define KPRIORITY int
! #define HLS_MAXIMUM_PRIORITY 32 /* FIXME: Shouldn't this go in rr.h??? */
#define CONTAINING_RECORD(address, type, field) ((type *)( \
***************
*** 77,80 ****
--- 81,91 ----
*/
};
+
+ typedef enum _HLS_BOOL {
+ HLS_FALSE = 0, HLS_TRUE = 0x600 // don't change this value
+ } HLS_BOOL;
+ typedef enum _HLS_STATUS {
+ HLS_SUCCESS = 0xadd0, HLS_NOROOM, HLS_INVALID_PARAMETER
+ } HLS_STATUS;
Index: interface-funcs.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/interface-funcs.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** interface-funcs.h 25 Feb 2003 09:18:58 -0000 1.3
--- interface-funcs.h 29 Nov 2003 09:11:35 -0000 1.4
***************
*** 26,33 ****
} while(0);
! #define hls_printk printf
! #define hls_hard_printk printf
! #define DbgPrint printf
#define hls_panic sim_panic
--- 26,33 ----
} while(0);
! #define hls_printk(...) fprintf(stderr, __VA_ARGS__)
! #define hls_hard_printk(...) fprintf(stderr, __VA_ARGS__)
! #define DbgPrint(...) fprintf(stderr, __VA_ARGS__)
#define hls_panic sim_panic
Index: os.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/os.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** os.h 25 Feb 2003 09:18:58 -0000 1.4
--- os.h 29 Nov 2003 09:11:35 -0000 1.5
***************
*** 9,12 ****
--- 9,15 ----
*/
+ #ifndef __OS_H__
+ #define __OS_H__
+
int random_priority(void);
struct sim_task_struct *make_new_thread(long long int create_time,
***************
*** 23,24 ****
--- 26,28 ----
void scheduler_set_default(char *mstr);
+ #endif /* __OS_H__ */
Index: sim.h
===================================================================
RCS file: /cvsroot/linux-hls/hls/simul/include/sim.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sim.h 25 Feb 2003 09:18:58 -0000 1.7
--- sim.h 29 Nov 2003 09:11:35 -0000 1.8
***************
*** 9,12 ****
--- 9,15 ----
*/
+ #ifndef __SIM_H__
+ #define __SIM_H__
+
#define SIM_MAX_THREADS 6000
***************
*** 34,37 ****
#define sim_printf printf
#else
! #define sim_printf(a, ...)
#endif
--- 37,42 ----
#define sim_printf printf
#else
! #define sim_printf(...)
#endif
+
+ #endif /* __SIM_H__ */
|