summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
Diffstat (limited to 'pfinet')
-rw-r--r--pfinet/dummy.c2
-rw-r--r--pfinet/ethernet.c18
-rw-r--r--pfinet/glue-include/linux/interrupt.h6
-rw-r--r--pfinet/glue-include/linux/kernel.h8
-rw-r--r--pfinet/glue-include/linux/sched.h14
-rw-r--r--pfinet/glue-include/linux/socket.h6
-rw-r--r--pfinet/glue-include/linux/types.h2
-rw-r--r--pfinet/io-ops.c4
-rw-r--r--pfinet/main.c4
-rw-r--r--pfinet/socket.c6
-rw-r--r--pfinet/tunnel.c12
11 files changed, 41 insertions, 41 deletions
diff --git a/pfinet/dummy.c b/pfinet/dummy.c
index b744f0f1..88301493 100644
--- a/pfinet/dummy.c
+++ b/pfinet/dummy.c
@@ -130,5 +130,5 @@ setup_dummy_device (char *name, struct device **device)
initializes its `ifindex' member (which matters!),
and tells the protocol stacks about the device. */
err = - register_netdevice (dev);
- assert_perror (err);
+ assert_perror_backtrace (err);
}
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c
index e6ae53ce..1b3b5d0f 100644
--- a/pfinet/ethernet.c
+++ b/pfinet/ethernet.c
@@ -197,11 +197,11 @@ ethernet_open (struct device *dev)
device_t master_device;
struct ether_device *edev = (struct ether_device *) dev->priv;
- assert (edev->ether_port == MACH_PORT_NULL);
+ assert_backtrace (edev->ether_port == MACH_PORT_NULL);
err = ports_create_port (etherreadclass, etherport_bucket,
sizeof (struct port_info), &edev->readpt);
- assert_perror (err);
+ assert_perror_backtrace (err);
edev->readptname = ports_get_right (edev->readpt);
mach_port_insert_right (mach_task_self (), edev->readptname, edev->readptname,
MACH_MSG_TYPE_MAKE_SEND);
@@ -291,8 +291,8 @@ ethernet_xmit (struct sk_buff *skb, struct device *dev)
}
else
{
- assert_perror (err);
- assert (count == skb->len);
+ assert_perror_backtrace (err);
+ assert_backtrace (count == skb->len);
}
}
while (err);
@@ -378,12 +378,12 @@ setup_ethernet_device (char *name, struct device **device)
if (err)
error (2, err, "%s: Cannot get device status", name);
dev->mtu = netstat.max_packet_size - dev->hard_header_len;
- assert (netstat.header_format == HDR_ETHERNET);
- assert (netstat.header_size == ETH_HLEN);
- assert (netstat.address_size == ETH_ALEN);
+ assert_backtrace (netstat.header_format == HDR_ETHERNET);
+ assert_backtrace (netstat.header_size == ETH_HLEN);
+ assert_backtrace (netstat.address_size == ETH_ALEN);
count = 2;
- assert (count * sizeof (int) >= ETH_ALEN);
+ assert_backtrace (count * sizeof (int) >= ETH_ALEN);
err = device_get_status (edev->ether_port, NET_ADDRESS, net_address, &count);
if (err)
error (2, err, "%s: Cannot get hardware Ethernet address", name);
@@ -397,5 +397,5 @@ setup_ethernet_device (char *name, struct device **device)
initializes its `ifindex' member (which matters!),
and tells the protocol stacks about the device. */
err = - register_netdevice (dev);
- assert_perror (err);
+ assert_perror_backtrace (err);
}
diff --git a/pfinet/glue-include/linux/interrupt.h b/pfinet/glue-include/linux/interrupt.h
index 22312ba4..49eb23db 100644
--- a/pfinet/glue-include/linux/interrupt.h
+++ b/pfinet/glue-include/linux/interrupt.h
@@ -30,7 +30,7 @@ extern int net_bh_raised;
static inline void
mark_bh (int bh)
{
- assert (bh == NET_BH);
+ assert_backtrace (bh == NET_BH);
net_bh_raised = 1;
pthread_cond_broadcast (&net_bh_wakeup);
}
@@ -39,8 +39,8 @@ void net_bh (void);
static inline void
init_bh (int bh, void (*fn) (void))
{
- assert (bh == NET_BH);
- assert (fn == &net_bh);
+ assert_backtrace (bh == NET_BH);
+ assert_backtrace (fn == &net_bh);
}
#endif
diff --git a/pfinet/glue-include/linux/kernel.h b/pfinet/glue-include/linux/kernel.h
index de5852f6..62ba2ff1 100644
--- a/pfinet/glue-include/linux/kernel.h
+++ b/pfinet/glue-include/linux/kernel.h
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <assert.h>
+#include <assert-backtrace.h>
/* These don't actually matter since our locking protocols are different. */
@@ -24,7 +24,7 @@
#define KERN_INFO
#define KERN_DEBUG
-#define panic(str...) (printk (str), assert (!"panic"))
+#define panic(str...) (printk (str), assert_backtrace (!"panic"))
/*
* Display an IP address in readable format.
@@ -63,14 +63,14 @@ putname (char *p)
static inline int
kill_proc (int pid, int signo, int priv)
{
- assert (signo == SIGURG);
+ assert_backtrace (signo == SIGURG);
return 0;
}
static inline int
kill_pg (int pgrp, int signo, int priv)
{
- assert (signo == SIGURG);
+ assert_backtrace (signo == SIGURG);
return 0;
}
diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h
index e39263e5..2446e88c 100644
--- a/pfinet/glue-include/linux/sched.h
+++ b/pfinet/glue-include/linux/sched.h
@@ -6,7 +6,7 @@
#include <mach.h>
#include <hurd/hurd_types.h>
#include <limits.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <pthread.h>
#include <errno.h>
@@ -105,7 +105,7 @@ interruptible_sleep_on_timeout (struct wait_queue **p, struct timespec *tsp)
if (c == 0)
{
c = malloc (sizeof **condp);
- assert (c);
+ assert_backtrace (c);
pthread_cond_init (c, NULL);
*condp = c;
}
@@ -134,21 +134,21 @@ wake_up_interruptible (struct wait_queue **p)
static inline void
add_wait_queue(struct wait_queue ** p, struct wait_queue * wait)
{
- assert (current->next_wait == 0);
+ assert_backtrace (current->next_wait == 0);
current->next_wait = p;
}
static inline void
remove_wait_queue(struct wait_queue ** p, struct wait_queue * wait)
{
- assert (current->next_wait == p);
+ assert_backtrace (current->next_wait == p);
current->next_wait = 0;
}
static inline void
schedule (void)
{
- assert (current->next_wait);
+ assert_backtrace (current->next_wait);
interruptible_sleep_on_timeout (current->next_wait, NULL);
}
@@ -201,8 +201,8 @@ schedule_timeout (long timeout)
static inline int
send_sig (u_long signo, struct task_struct *task, int priv)
{
- assert (signo == SIGPIPE);
- assert (task == current);
+ assert_backtrace (signo == SIGPIPE);
+ assert_backtrace (task == current);
return 0;
}
diff --git a/pfinet/glue-include/linux/socket.h b/pfinet/glue-include/linux/socket.h
index 057afbdb..a7475eaf 100644
--- a/pfinet/glue-include/linux/socket.h
+++ b/pfinet/glue-include/linux/socket.h
@@ -111,14 +111,14 @@ extern inline int /* Does not modify IOV. */
memcpy_fromiovecend (unsigned char *kdata, struct iovec *iov,
int offset, int len)
{
- assert (offset + len <= iov->iov_len);
+ assert_backtrace (offset + len <= iov->iov_len);
memcpy (kdata, iov->iov_base + offset, len);
return 0;
}
extern inline int /* Modifies IOV to consume LEN bytes. */
memcpy_fromiovec (unsigned char *kdata, struct iovec *iov, int len)
{
- assert (len <= iov->iov_len);
+ assert_backtrace (len <= iov->iov_len);
memcpy (kdata, iov->iov_base, len);
iov->iov_base += len;
iov->iov_len -= len;
@@ -127,7 +127,7 @@ memcpy_fromiovec (unsigned char *kdata, struct iovec *iov, int len)
extern inline void /* Modifies IOV to consume LEN bytes. */
memcpy_tokerneliovec (struct iovec *iov, unsigned char *kdata, int len)
{
- assert (len <= iov->iov_len);
+ assert_backtrace (len <= iov->iov_len);
memcpy (iov->iov_base, kdata, len);
iov->iov_base += len;
iov->iov_len -= len;
diff --git a/pfinet/glue-include/linux/types.h b/pfinet/glue-include/linux/types.h
index 604b8b14..f348ac25 100644
--- a/pfinet/glue-include/linux/types.h
+++ b/pfinet/glue-include/linux/types.h
@@ -4,7 +4,7 @@
#include <sys/types.h>
#include <sys/uio.h>
#include <stdint.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <string.h>
#define __u8 uint8_t
diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
index 742d64ff..ddda1110 100644
--- a/pfinet/io-ops.c
+++ b/pfinet/io-ops.c
@@ -269,7 +269,7 @@ io_select_common (struct sock_user *user,
/* In Linux, this means (supposedly) that I/O will never be possible.
That's a lose, so prevent it from happening. */
- assert (user->sock->ops->poll);
+ assert_backtrace (user->sock->ops->poll);
avail = (*user->sock->ops->poll) ((void *) 0xdeadbeef,
user->sock,
@@ -378,7 +378,7 @@ S_io_reauthenticate (struct sock_user *user,
auth = getauth ();
newright = ports_get_send_right (newuser);
- assert (newright != MACH_PORT_NULL);
+ assert_backtrace (newright != MACH_PORT_NULL);
/* Release the global lock while blocking on the auth server and client. */
pthread_mutex_unlock (&global_lock);
do
diff --git a/pfinet/main.c b/pfinet/main.c
index 5e4b7494..6b1b7238 100644
--- a/pfinet/main.c
+++ b/pfinet/main.c
@@ -197,7 +197,7 @@ find_device (char *name, struct device **device)
char *base_name;
/* Skip loopback interface. */
- assert (dev);
+ assert_backtrace (dev);
dev = dev->next;
if (!name)
@@ -252,7 +252,7 @@ enumerate_devices (error_t (*fun) (struct device *dev))
struct device *dev = dev_base;
/* Skip loopback device. */
- assert (dev);
+ assert_backtrace (dev);
dev = dev->next;
for (; dev; dev = dev->next)
diff --git a/pfinet/socket.c b/pfinet/socket.c
index 06ce2c7e..4a12426c 100644
--- a/pfinet/socket.c
+++ b/pfinet/socket.c
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include <assert.h>
+#include <assert-backtrace.h>
#include "pfinet.h"
#include <linux/socket.h>
@@ -32,7 +32,7 @@ struct net_proto_family *net_families[NPROTO];
int
sock_register (struct net_proto_family *fam)
{
- assert (fam->family < NPROTO);
+ assert_backtrace (fam->family < NPROTO);
net_families[fam->family] = fam;
return 0;
}
@@ -72,7 +72,7 @@ make_sock_user (struct socket *sock, int isroot, int noinstall, int consume)
error_t err;
struct sock_user *user;
- assert (sock->refcnt != 0);
+ assert_backtrace (sock->refcnt != 0);
if (noinstall)
err = ports_create_port_noinstall (socketport_class, pfinet_bucket,
diff --git a/pfinet/tunnel.c b/pfinet/tunnel.c
index 02e9ee81..b57f8dbb 100644
--- a/pfinet/tunnel.c
+++ b/pfinet/tunnel.c
@@ -68,7 +68,7 @@ tunnel_get_stats (struct device *dev)
{
struct tunnel_device *tdev = (struct tunnel_device *) dev->priv;
- assert (tdev);
+ assert_backtrace (tdev);
return &tdev->stats;
}
@@ -79,7 +79,7 @@ tunnel_stop (struct device *dev)
struct tunnel_device *tdev = (struct tunnel_device *) dev->priv;
struct sk_buff *skb;
- assert (tdev);
+ assert_backtrace (tdev);
while ((skb = skb_dequeue (&tdev->xq)) != 0)
dev_kfree_skb(skb);
@@ -105,7 +105,7 @@ tunnel_open (struct device *dev)
{
struct tunnel_device *tdev = (struct tunnel_device *) dev->priv;
- assert (tdev);
+ assert_backtrace (tdev);
skb_queue_head_init(&tdev->xq);
@@ -118,7 +118,7 @@ tunnel_xmit (struct sk_buff *skb, struct device *dev)
{
struct tunnel_device *tdev = (struct tunnel_device *) dev->priv;
- assert (tdev);
+ assert_backtrace (tdev);
pthread_mutex_lock (&tdev->lock);
@@ -232,7 +232,7 @@ setup_tunnel_device (char *name, struct device **device)
initializes its `ifindex' member (which matters!),
and tells the protocol stacks about the device. */
err = - register_netdevice (dev);
- assert_perror (err);
+ assert_perror_backtrace (err);
}
/* If a new open with read and/or write permissions is requested,
@@ -327,7 +327,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
}
skb = skb_dequeue (&tdev->xq);
- assert(skb);
+ assert_backtrace (skb);
if (skb->len < amount)
amount = skb->len;