$(CC) $(CFLAGS) -o $@ -c $<
OBJ = buf.o clock.o inet.o inet_config.o \
- mnx_eth.o mq.o qp.o sr.o stacktrace.o \
+ mnx_eth.o mq.o qp.o sr.o \
$g/udp.o $g/arp.o $g/eth.o $g/event.o \
$g/icmp.o $g/io.o $g/ip.o $g/ip_ioctl.o \
$g/ip_lib.o $g/ip_read.o $g/ip_write.o \
extern int inet_buf_debug;
#endif
+#if HZ_DYNAMIC
+u32_t system_hz;
+#endif
+
_PROTOTYPE( void main, (void) );
FORWARD _PROTOTYPE( void nw_conf, (void) );
printf("%s\n", version);
#endif
+#if HZ_DYNAMIC
+ system_hz = sys_hz();
+#endif
+
/* Read configuration. */
nw_conf();
PUBLIC void inet_panic()
{
printf("\ninet stacktrace: ");
- stacktrace();
+ util_stacktrace();
#ifdef __minix_vmd
sys_abort(RBT_PANIC);
#else /* Minix 3 */
printf("warning at %s, %d: ", this_file, __LINE__), \
printf print_list, \
printf("\ninet stacktrace: "), \
- stacktrace() \
+ util_stacktrace() \
)
#else
#define ip_warning(print_list) ((void) 0)
extern int this_proc;
extern char version[];
-void stacktrace ARGS(( void ));
+#ifndef HZ
+EXTERN u32_t system_hz;
+#define HZ system_hz
+#define HZ_DYNAMIC 1
+#endif
#endif /* INET__INET_H */
+++ /dev/null
-/*
-stacktrace.c
-
-Created: Jan 19, 1993 by Philip Homburg
-
-Copyright 1995 Philip Homburg
-*/
-
-#include "inet.h"
-
-PUBLIC void stacktrace()
-{
- typedef unsigned int reg_t;
- reg_t bp, pc, hbp;
- extern reg_t get_bp ARGS(( void ));
-
- bp= get_bp();
- while(bp)
- {
- pc= ((reg_t *)bp)[1];
- hbp= ((reg_t *)bp)[0];
- printf("0x%lx ", (unsigned long)pc);
- if (hbp != 0 && hbp <= bp)
- {
- printf("???");
- break;
- }
- bp= hbp;
- }
- printf("\n");
-}
-
-/*
- * $PchId: stacktrace.c,v 1.6 1996/05/07 21:11:34 philip Exp $
- */