summaryrefslogtreecommitdiff
path: root/pfinet/linux-src/include/linux
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2016-01-02 18:38:31 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-01-02 18:48:57 +0100
commit05e6878c8767cf7006675d5e5a646b2f74aa88c7 (patch)
tree3cba4a57d98573761d4538f6a24f1be1c2b2c197 /pfinet/linux-src/include/linux
parent5714421bb1d066abebc7e993bdf06e655b879b3a (diff)
allow pfinet to link using -O0
This fixes a long list of undefined references when compiling with -O0 by using static instead of extern in header files.
Diffstat (limited to 'pfinet/linux-src/include/linux')
-rw-r--r--pfinet/linux-src/include/linux/atalk.h2
-rw-r--r--pfinet/linux-src/include/linux/bitops.h8
-rw-r--r--pfinet/linux-src/include/linux/filter.h2
-rw-r--r--pfinet/linux-src/include/linux/firewall.h6
-rw-r--r--pfinet/linux-src/include/linux/hfs_fs.h4
-rw-r--r--pfinet/linux-src/include/linux/igmp.h2
-rw-r--r--pfinet/linux-src/include/linux/inetdevice.h8
-rw-r--r--pfinet/linux-src/include/linux/ipsec.h4
-rw-r--r--pfinet/linux-src/include/linux/netdevice.h10
-rw-r--r--pfinet/linux-src/include/linux/netlink.h2
-rw-r--r--pfinet/linux-src/include/linux/notifier.h6
-rw-r--r--pfinet/linux-src/include/linux/parport.h6
-rw-r--r--pfinet/linux-src/include/linux/parport_pc.h32
-rw-r--r--pfinet/linux-src/include/linux/quotaops.h16
-rw-r--r--pfinet/linux-src/include/linux/rtnetlink.h22
-rw-r--r--pfinet/linux-src/include/linux/sched.h10
-rw-r--r--pfinet/linux-src/include/linux/skbuff.h96
-rw-r--r--pfinet/linux-src/include/linux/tqueue.h4
18 files changed, 112 insertions, 128 deletions
diff --git a/pfinet/linux-src/include/linux/atalk.h b/pfinet/linux-src/include/linux/atalk.h
index e9d20979..491585a7 100644
--- a/pfinet/linux-src/include/linux/atalk.h
+++ b/pfinet/linux-src/include/linux/atalk.h
@@ -161,7 +161,7 @@ extern void aarp_proto_init(void);
* Give a device find its atif control structure
*/
-extern __inline__ struct atalk_iface *atalk_find_dev(struct device *dev)
+static __inline__ struct atalk_iface *atalk_find_dev(struct device *dev)
{
return dev->atalk_ptr;
}
diff --git a/pfinet/linux-src/include/linux/bitops.h b/pfinet/linux-src/include/linux/bitops.h
index ddb84dd6..646edc42 100644
--- a/pfinet/linux-src/include/linux/bitops.h
+++ b/pfinet/linux-src/include/linux/bitops.h
@@ -8,7 +8,7 @@
* differs in spirit from the above ffz (man ffs).
*/
-extern __inline__ int generic_ffs(int x)
+static __inline__ int generic_ffs(int x)
{
int r = 1;
@@ -42,7 +42,7 @@ extern __inline__ int generic_ffs(int x)
* of bits set) of a N-bit word
*/
-extern __inline__ unsigned int generic_hweight32(unsigned int w)
+static __inline__ unsigned int generic_hweight32(unsigned int w)
{
unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
@@ -51,7 +51,7 @@ extern __inline__ unsigned int generic_hweight32(unsigned int w)
return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
}
-extern __inline__ unsigned int generic_hweight16(unsigned int w)
+static __inline__ unsigned int generic_hweight16(unsigned int w)
{
unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555);
res = (res & 0x3333) + ((res >> 2) & 0x3333);
@@ -59,7 +59,7 @@ extern __inline__ unsigned int generic_hweight16(unsigned int w)
return (res & 0x00FF) + ((res >> 8) & 0x00FF);
}
-extern __inline__ unsigned int generic_hweight8(unsigned int w)
+static __inline__ unsigned int generic_hweight8(unsigned int w)
{
unsigned int res = (w & 0x55) + ((w >> 1) & 0x55);
res = (res & 0x33) + ((res >> 2) & 0x33);
diff --git a/pfinet/linux-src/include/linux/filter.h b/pfinet/linux-src/include/linux/filter.h
index 58ad8b1b..4978919f 100644
--- a/pfinet/linux-src/include/linux/filter.h
+++ b/pfinet/linux-src/include/linux/filter.h
@@ -38,7 +38,7 @@ struct sk_filter
struct sock_filter insns[0];
};
-extern __inline__ unsigned int sk_filter_len(struct sk_filter *fp)
+static __inline__ unsigned int sk_filter_len(struct sk_filter *fp)
{
return fp->len*sizeof(struct sock_filter) + sizeof(*fp);
}
diff --git a/pfinet/linux-src/include/linux/firewall.h b/pfinet/linux-src/include/linux/firewall.h
index 1747f381..460fa81d 100644
--- a/pfinet/linux-src/include/linux/firewall.h
+++ b/pfinet/linux-src/include/linux/firewall.h
@@ -41,17 +41,17 @@ extern int call_fw_firewall(int pf, struct device *dev, void *phdr, void *arg, s
extern int call_in_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **pskb);
extern int call_out_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **pskb);
#else
-extern __inline__ int call_fw_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **skb)
+static __inline__ int call_fw_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **skb)
{
return FW_ACCEPT;
}
-extern __inline__ int call_in_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **skb)
+static __inline__ int call_in_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **skb)
{
return FW_ACCEPT;
}
-extern __inline__ int call_out_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **skb)
+static __inline__ int call_out_firewall(int pf, struct device *dev, void *phdr, void *arg, struct sk_buff **skb)
{
return FW_ACCEPT;
}
diff --git a/pfinet/linux-src/include/linux/hfs_fs.h b/pfinet/linux-src/include/linux/hfs_fs.h
index 851bcb0d..04241f71 100644
--- a/pfinet/linux-src/include/linux/hfs_fs.h
+++ b/pfinet/linux-src/include/linux/hfs_fs.h
@@ -319,12 +319,12 @@ extern void hfs_tolower(unsigned char *, int);
#define HFS_I(X) (&((X)->u.hfs_i))
#define HFS_SB(X) (&((X)->u.hfs_sb))
-extern __inline__ void hfs_nameout(struct inode *dir, struct hfs_name *out,
+static __inline__ void hfs_nameout(struct inode *dir, struct hfs_name *out,
const char *in, int len) {
HFS_SB(dir->i_sb)->s_nameout(out, in, len);
}
-extern __inline__ int hfs_namein(struct inode *dir, char *out,
+static __inline__ int hfs_namein(struct inode *dir, char *out,
const struct hfs_name *in) {
int len = HFS_SB(dir->i_sb)->s_namein(out, in);
if (HFS_SB(dir->i_sb)->s_lowercase) {
diff --git a/pfinet/linux-src/include/linux/igmp.h b/pfinet/linux-src/include/linux/igmp.h
index c13afde2..578ab98e 100644
--- a/pfinet/linux-src/include/linux/igmp.h
+++ b/pfinet/linux-src/include/linux/igmp.h
@@ -101,7 +101,7 @@ struct ip_mc_list
char loaded;
};
-extern __inline__ int ip_check_mc(struct device *dev, u32 mc_addr)
+static __inline__ int ip_check_mc(struct device *dev, u32 mc_addr)
{
struct in_device *in_dev = dev->ip_ptr;
struct ip_mc_list *im;
diff --git a/pfinet/linux-src/include/linux/inetdevice.h b/pfinet/linux-src/include/linux/inetdevice.h
index 323a305c..c9570452 100644
--- a/pfinet/linux-src/include/linux/inetdevice.h
+++ b/pfinet/linux-src/include/linux/inetdevice.h
@@ -80,7 +80,7 @@ extern u32 inet_select_addr(struct device *dev, u32 dst, int scope);
extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask);
extern void inet_forward_change(void);
-extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa)
+static __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa)
{
return !((addr^ifa->ifa_address)&ifa->ifa_mask);
}
@@ -89,7 +89,7 @@ extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa)
* Check if a mask is acceptable.
*/
-extern __inline__ int bad_mask(u32 mask, u32 addr)
+static __inline__ int bad_mask(u32 mask, u32 addr)
{
if (addr & (mask = ~mask))
return 1;
@@ -110,14 +110,14 @@ extern __inline__ int bad_mask(u32 mask, u32 addr)
#endif /* __KERNEL__ */
-extern __inline__ __u32 inet_make_mask(int logmask)
+static __inline__ __u32 inet_make_mask(int logmask)
{
if (logmask)
return htonl(~((1<<(32-logmask))-1));
return 0;
}
-extern __inline__ int inet_mask_len(__u32 mask)
+static __inline__ int inet_mask_len(__u32 mask)
{
if (!(mask = ntohl(mask)))
return 0;
diff --git a/pfinet/linux-src/include/linux/ipsec.h b/pfinet/linux-src/include/linux/ipsec.h
index b9d7bcc6..2ccf61d0 100644
--- a/pfinet/linux-src/include/linux/ipsec.h
+++ b/pfinet/linux-src/include/linux/ipsec.h
@@ -49,7 +49,7 @@
*/
#ifdef CONFIG_NET_SECURITY
-extern __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb)
+static __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb)
{
return ((sk->authentication < IPSEC_LEVEL_REQUIRE) ||
(skb->security & RCV_AUTH)) &&
@@ -59,7 +59,7 @@ extern __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb)
#else
-extern __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb)
+static __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb)
{
return 1;
}
diff --git a/pfinet/linux-src/include/linux/netdevice.h b/pfinet/linux-src/include/linux/netdevice.h
index 0b6af203..6ca7312e 100644
--- a/pfinet/linux-src/include/linux/netdevice.h
+++ b/pfinet/linux-src/include/linux/netdevice.h
@@ -362,7 +362,7 @@ extern int dev_restart(struct device *dev);
typedef int gifconf_func_t(struct device * dev, char * bufptr, int len);
extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
-extern __inline__ int unregister_gifconf(unsigned int family)
+static __inline__ int unregister_gifconf(unsigned int family)
{
return register_gifconf(family, 0);
}
@@ -388,12 +388,12 @@ extern atomic_t dev_lockct;
* but they may do soon. Do it properly anyway.
*/
-extern __inline__ void dev_lock_list(void)
+static __inline__ void dev_lock_list(void)
{
atomic_inc(&dev_lockct);
}
-extern __inline__ void dev_unlock_list(void)
+static __inline__ void dev_unlock_list(void)
{
atomic_dec(&dev_lockct);
}
@@ -409,7 +409,7 @@ extern __inline__ void dev_unlock_list(void)
* is not atomic.
*/
-extern __inline__ void dev_lock_wait(void)
+static __inline__ void dev_lock_wait(void)
{
while (atomic_read(&dev_lockct)) {
current->policy |= SCHED_YIELD;
@@ -417,7 +417,7 @@ extern __inline__ void dev_lock_wait(void)
}
}
-extern __inline__ void dev_init_buffers(struct device *dev)
+static __inline__ void dev_init_buffers(struct device *dev)
{
/* DO NOTHING */
}
diff --git a/pfinet/linux-src/include/linux/netlink.h b/pfinet/linux-src/include/linux/netlink.h
index 59075b07..e2525ce4 100644
--- a/pfinet/linux-src/include/linux/netlink.h
+++ b/pfinet/linux-src/include/linux/netlink.h
@@ -126,7 +126,7 @@ struct netlink_callback
long args[4];
};
-extern __inline__ struct nlmsghdr *
+static __inline__ struct nlmsghdr *
__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len)
{
struct nlmsghdr *nlh;
diff --git a/pfinet/linux-src/include/linux/notifier.h b/pfinet/linux-src/include/linux/notifier.h
index 1e8bf707..633f61a2 100644
--- a/pfinet/linux-src/include/linux/notifier.h
+++ b/pfinet/linux-src/include/linux/notifier.h
@@ -26,7 +26,7 @@ struct notifier_block
#define NOTIFY_STOP_MASK 0x8000 /* Don't call further */
#define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) /* Bad/Veto action */
-extern __inline__ int notifier_chain_register(struct notifier_block **list, struct notifier_block *n)
+static __inline__ int notifier_chain_register(struct notifier_block **list, struct notifier_block *n)
{
while(*list)
{
@@ -44,7 +44,7 @@ extern __inline__ int notifier_chain_register(struct notifier_block **list, stru
* GPL'd
*/
-extern __inline__ int notifier_chain_unregister(struct notifier_block **nl, struct notifier_block *n)
+static __inline__ int notifier_chain_unregister(struct notifier_block **nl, struct notifier_block *n)
{
while((*nl)!=NULL)
{
@@ -62,7 +62,7 @@ extern __inline__ int notifier_chain_unregister(struct notifier_block **nl, stru
* This is one of these things that is generally shorter inline
*/
-extern __inline__ int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)
+static __inline__ int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)
{
int ret=NOTIFY_DONE;
struct notifier_block *nb = *n;
diff --git a/pfinet/linux-src/include/linux/parport.h b/pfinet/linux-src/include/linux/parport.h
index 856fc016..3712ce16 100644
--- a/pfinet/linux-src/include/linux/parport.h
+++ b/pfinet/linux-src/include/linux/parport.h
@@ -277,7 +277,7 @@ extern void parport_release(struct pardevice *dev);
/* parport_yield relinquishes the port if it would be helpful to other
* drivers. The return value is the same as for parport_claim.
*/
-extern __inline__ int parport_yield(struct pardevice *dev)
+static __inline__ int parport_yield(struct pardevice *dev)
{
unsigned long int timeslip = (jiffies - dev->time);
if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice))
@@ -289,7 +289,7 @@ extern __inline__ int parport_yield(struct pardevice *dev)
/* parport_yield_blocking is the same but uses parport_claim_or_block
* instead of parport_claim.
*/
-extern __inline__ int parport_yield_blocking(struct pardevice *dev)
+static __inline__ int parport_yield_blocking(struct pardevice *dev)
{
unsigned long int timeslip = (jiffies - dev->time);
if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice))
@@ -301,7 +301,7 @@ extern __inline__ int parport_yield_blocking(struct pardevice *dev)
/*
* Lowlevel drivers _can_ call this support function to handle irqs.
*/
-extern __inline__ void parport_generic_irq(int irq, struct parport *port,
+static __inline__ void parport_generic_irq(int irq, struct parport *port,
struct pt_regs *regs)
{
read_lock(&port->cad_lock);
diff --git a/pfinet/linux-src/include/linux/parport_pc.h b/pfinet/linux-src/include/linux/parport_pc.h
index f7ef3406..c040693a 100644
--- a/pfinet/linux-src/include/linux/parport_pc.h
+++ b/pfinet/linux-src/include/linux/parport_pc.h
@@ -25,27 +25,27 @@ extern int parport_pc_epp_clear_timeout(struct parport *pb);
extern volatile unsigned char parport_pc_ctr;
-extern __inline__ void parport_pc_write_epp(struct parport *p, unsigned char d)
+static __inline__ void parport_pc_write_epp(struct parport *p, unsigned char d)
{
outb(d, EPPDATA(p));
}
-extern __inline__ unsigned char parport_pc_read_epp(struct parport *p)
+static __inline__ unsigned char parport_pc_read_epp(struct parport *p)
{
return inb(EPPDATA(p));
}
-extern __inline__ void parport_pc_write_epp_addr(struct parport *p, unsigned char d)
+static __inline__ void parport_pc_write_epp_addr(struct parport *p, unsigned char d)
{
outb(d, EPPADDR(p));
}
-extern __inline__ unsigned char parport_pc_read_epp_addr(struct parport *p)
+static __inline__ unsigned char parport_pc_read_epp_addr(struct parport *p)
{
return inb(EPPADDR(p));
}
-extern __inline__ int parport_pc_check_epp_timeout(struct parport *p)
+static __inline__ int parport_pc_check_epp_timeout(struct parport *p)
{
if (!(inb(STATUS(p)) & 1))
return 0;
@@ -53,35 +53,35 @@ extern __inline__ int parport_pc_check_epp_timeout(struct parport *p)
return 1;
}
-extern __inline__ unsigned char parport_pc_read_configb(struct parport *p)
+static __inline__ unsigned char parport_pc_read_configb(struct parport *p)
{
return inb(CONFIGB(p));
}
-extern __inline__ void parport_pc_write_data(struct parport *p, unsigned char d)
+static __inline__ void parport_pc_write_data(struct parport *p, unsigned char d)
{
outb(d, DATA(p));
}
-extern __inline__ unsigned char parport_pc_read_data(struct parport *p)
+static __inline__ unsigned char parport_pc_read_data(struct parport *p)
{
return inb(DATA(p));
}
-extern __inline__ void parport_pc_write_control(struct parport *p, unsigned char d)
+static __inline__ void parport_pc_write_control(struct parport *p, unsigned char d)
{
struct parport_pc_private *priv = p->private_data;
priv->ctr = d;/* update soft copy */
outb(d, CONTROL(p));
}
-extern __inline__ unsigned char parport_pc_read_control(struct parport *p)
+static __inline__ unsigned char parport_pc_read_control(struct parport *p)
{
struct parport_pc_private *priv = p->private_data;
return priv->ctr;
}
-extern __inline__ unsigned char parport_pc_frob_control(struct parport *p, unsigned char mask, unsigned char val)
+static __inline__ unsigned char parport_pc_frob_control(struct parport *p, unsigned char mask, unsigned char val)
{
struct parport_pc_private *priv = p->private_data;
unsigned char ctr = priv->ctr;
@@ -90,27 +90,27 @@ extern __inline__ unsigned char parport_pc_frob_control(struct parport *p, unsig
return priv->ctr = ctr; /* update soft copy */
}
-extern __inline__ void parport_pc_write_status(struct parport *p, unsigned char d)
+static __inline__ void parport_pc_write_status(struct parport *p, unsigned char d)
{
outb(d, STATUS(p));
}
-extern __inline__ unsigned char parport_pc_read_status(struct parport *p)
+static __inline__ unsigned char parport_pc_read_status(struct parport *p)
{
return inb(STATUS(p));
}
-extern __inline__ void parport_pc_write_econtrol(struct parport *p, unsigned char d)
+static __inline__ void parport_pc_write_econtrol(struct parport *p, unsigned char d)
{
outb(d, ECONTROL(p));
}
-extern __inline__ unsigned char parport_pc_read_econtrol(struct parport *p)
+static __inline__ unsigned char parport_pc_read_econtrol(struct parport *p)
{
return inb(ECONTROL(p));
}
-extern __inline__ unsigned char parport_pc_frob_econtrol(struct parport *p, unsigned char mask, unsigned char val)
+static __inline__ unsigned char parport_pc_frob_econtrol(struct parport *p, unsigned char mask, unsigned char val)
{
unsigned char old = inb(ECONTROL(p));
outb(((old & ~mask) ^ val), ECONTROL(p));
diff --git a/pfinet/linux-src/include/linux/quotaops.h b/pfinet/linux-src/include/linux/quotaops.h
index bb76e715..ffa500ce 100644
--- a/pfinet/linux-src/include/linux/quotaops.h
+++ b/pfinet/linux-src/include/linux/quotaops.h
@@ -37,13 +37,13 @@ extern int dquot_transfer(struct dentry *dentry, struct iattr *iattr,
/*
* Operations supported for diskquotas.
*/
-extern __inline__ void DQUOT_INIT(struct inode *inode)
+static __inline__ void DQUOT_INIT(struct inode *inode)
{
if (inode->i_sb && inode->i_sb->dq_op)
inode->i_sb->dq_op->initialize(inode, -1);
}
-extern __inline__ void DQUOT_DROP(struct inode *inode)
+static __inline__ void DQUOT_DROP(struct inode *inode)
{
if (IS_QUOTAINIT(inode)) {
if (inode->i_sb && inode->i_sb->dq_op)
@@ -51,7 +51,7 @@ extern __inline__ void DQUOT_DROP(struct inode *inode)
}
}
-extern __inline__ int DQUOT_PREALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr)
+static __inline__ int DQUOT_PREALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr)
{
if (sb->dq_op) {
if (sb->dq_op->alloc_block(inode, fs_to_dq_blocks(nr, sb->s_blocksize),
@@ -61,7 +61,7 @@ extern __inline__ int DQUOT_PREALLOC_BLOCK(struct super_block *sb, const struct
return 0;
}
-extern __inline__ int DQUOT_ALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr)
+static __inline__ int DQUOT_ALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr)
{
if (sb->dq_op) {
if (sb->dq_op->alloc_block(inode, fs_to_dq_blocks(nr, sb->s_blocksize),
@@ -71,7 +71,7 @@ extern __inline__ int DQUOT_ALLOC_BLOCK(struct super_block *sb, const struct ino
return 0;
}
-extern __inline__ int DQUOT_ALLOC_INODE(struct super_block *sb, struct inode *inode)
+static __inline__ int DQUOT_ALLOC_INODE(struct super_block *sb, struct inode *inode)
{
if (sb->dq_op) {
sb->dq_op->initialize (inode, -1);
@@ -82,19 +82,19 @@ extern __inline__ int DQUOT_ALLOC_INODE(struct super_block *sb, struct inode *in
return 0;
}
-extern __inline__ void DQUOT_FREE_BLOCK(struct super_block *sb, const struct inode *inode, int nr)
+static __inline__ void DQUOT_FREE_BLOCK(struct super_block *sb, const struct inode *inode, int nr)
{
if (sb->dq_op)
sb->dq_op->free_block(inode, fs_to_dq_blocks(nr, sb->s_blocksize));
}
-extern __inline__ void DQUOT_FREE_INODE(struct super_block *sb, struct inode *inode)
+static __inline__ void DQUOT_FREE_INODE(struct super_block *sb, struct inode *inode)
{
if (sb->dq_op)
sb->dq_op->free_inode(inode, 1);
}
-extern __inline__ int DQUOT_TRANSFER(struct dentry *dentry, struct iattr *iattr)
+static __inline__ int DQUOT_TRANSFER(struct dentry *dentry, struct iattr *iattr)
{
int error = -EDQUOT;
diff --git a/pfinet/linux-src/include/linux/rtnetlink.h b/pfinet/linux-src/include/linux/rtnetlink.h
index 548a9b14..ae529034 100644
--- a/pfinet/linux-src/include/linux/rtnetlink.h
+++ b/pfinet/linux-src/include/linux/rtnetlink.h
@@ -515,7 +515,7 @@ enum
extern atomic_t rtnl_rlockct;
extern struct wait_queue *rtnl_wait;
-extern __inline__ int rtattr_strcmp(struct rtattr *rta, char *str)
+static __inline__ int rtattr_strcmp(struct rtattr *rta, char *str)
{
int len = strlen(str) + 1;
return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len);
@@ -563,7 +563,7 @@ extern unsigned long rtnl_wlockct;
* useful thing. --ANK
*/
-extern __inline__ int rtnl_shlock_nowait(void)
+static __inline__ int rtnl_shlock_nowait(void)
{
atomic_inc(&rtnl_rlockct);
if (test_bit(0, &rtnl_wlockct)) {
@@ -573,7 +573,7 @@ extern __inline__ int rtnl_shlock_nowait(void)
return 0;
}
-extern __inline__ void rtnl_shlock(void)
+static __inline__ void rtnl_shlock(void)
{
while (rtnl_shlock_nowait())
sleep_on(&rtnl_wait);
@@ -583,7 +583,7 @@ extern __inline__ void rtnl_shlock(void)
Shared lock must be already grabbed with rtnl_shlock*().
*/
-extern __inline__ int rtnl_exlock_nowait(void)
+static __inline__ int rtnl_exlock_nowait(void)
{
if (atomic_read(&rtnl_rlockct) > 1)
return -EAGAIN;
@@ -592,14 +592,14 @@ extern __inline__ int rtnl_exlock_nowait(void)
return 0;
}
-extern __inline__ void rtnl_exlock(void)
+static __inline__ void rtnl_exlock(void)
{
while (rtnl_exlock_nowait())
sleep_on(&rtnl_wait);
}
#if 0
-extern __inline__ void rtnl_shunlock(void)
+static __inline__ void rtnl_shunlock(void)
{
atomic_dec(&rtnl_rlockct);
if (atomic_read(&rtnl_rlockct) <= 1) {
@@ -628,7 +628,7 @@ extern __inline__ void rtnl_shunlock(void)
* it will be done later after releasing shared lock.
*/
-extern __inline__ void rtnl_exunlock(void)
+static __inline__ void rtnl_exunlock(void)
{
clear_bit(0, &rtnl_wlockct);
wake_up(&rtnl_wait);
@@ -636,7 +636,7 @@ extern __inline__ void rtnl_exunlock(void)
#else
-extern __inline__ void rtnl_shlock(void)
+static __inline__ void rtnl_shlock(void)
{
#ifndef _HURD_
while (atomic_read(&rtnl_rlockct))
@@ -645,7 +645,7 @@ extern __inline__ void rtnl_shlock(void)
#endif
}
-extern __inline__ void rtnl_shunlock(void)
+static __inline__ void rtnl_shunlock(void)
{
#ifndef _HURD_
if (atomic_dec_and_test(&rtnl_rlockct))
@@ -653,11 +653,11 @@ extern __inline__ void rtnl_shunlock(void)
#endif
}
-extern __inline__ void rtnl_exlock(void)
+static __inline__ void rtnl_exlock(void)
{
}
-extern __inline__ void rtnl_exunlock(void)
+static __inline__ void rtnl_exunlock(void)
{
}
diff --git a/pfinet/linux-src/include/linux/sched.h b/pfinet/linux-src/include/linux/sched.h
index d983c17e..c0e54d86 100644
--- a/pfinet/linux-src/include/linux/sched.h
+++ b/pfinet/linux-src/include/linux/sched.h
@@ -410,7 +410,7 @@ extern struct task_struct *task[NR_TASKS];
extern struct task_struct **tarray_freelist;
extern spinlock_t taskslot_lock;
-extern __inline__ void add_free_taskslot(struct task_struct **t)
+static __inline__ void add_free_taskslot(struct task_struct **t)
{
spin_lock(&taskslot_lock);
*t = (struct task_struct *) tarray_freelist;
@@ -418,7 +418,7 @@ extern __inline__ void add_free_taskslot(struct task_struct **t)
spin_unlock(&taskslot_lock);
}
-extern __inline__ struct task_struct **get_free_taskslot(void)
+static __inline__ struct task_struct **get_free_taskslot(void)
{
struct task_struct **tslot;
@@ -436,7 +436,7 @@ extern struct task_struct *pidhash[PIDHASH_SZ];
#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
-extern __inline__ void hash_pid(struct task_struct *p)
+static __inline__ void hash_pid(struct task_struct *p)
{
struct task_struct **htable = &pidhash[pid_hashfn(p->pid)];
@@ -446,14 +446,14 @@ extern __inline__ void hash_pid(struct task_struct *p)
p->pidhash_pprev = htable;
}
-extern __inline__ void unhash_pid(struct task_struct *p)
+static __inline__ void unhash_pid(struct task_struct *p)
{
if(p->pidhash_next)
p->pidhash_next->pidhash_pprev = p->pidhash_pprev;
*p->pidhash_pprev = p->pidhash_next;
}
-extern __inline__ struct task_struct *find_task_by_pid(int pid)
+static __inline__ struct task_struct *find_task_by_pid(int pid)
{
struct task_struct *p, **htable = &pidhash[pid_hashfn(pid)];
diff --git a/pfinet/linux-src/include/linux/skbuff.h b/pfinet/linux-src/include/linux/skbuff.h
index 82d5da6e..452cbdaf 100644
--- a/pfinet/linux-src/include/linux/skbuff.h
+++ b/pfinet/linux-src/include/linux/skbuff.h
@@ -134,62 +134,46 @@ struct sk_buff {
#include <asm/system.h>
extern void __kfree_skb(struct sk_buff *skb);
-extern void skb_queue_head_init(struct sk_buff_head *list);
-extern void skb_queue_head(struct sk_buff_head *list,struct sk_buff *buf);
-extern void skb_queue_tail(struct sk_buff_head *list,struct sk_buff *buf);
-extern struct sk_buff * skb_dequeue(struct sk_buff_head *list);
-extern void skb_insert(struct sk_buff *old,struct sk_buff *newsk);
-extern void skb_append(struct sk_buff *old,struct sk_buff *newsk);
-extern void skb_unlink(struct sk_buff *buf);
-extern __u32 skb_queue_len(struct sk_buff_head *list);
extern struct sk_buff * skb_peek_copy(struct sk_buff_head *list);
extern struct sk_buff * alloc_skb(unsigned int size, int priority);
-extern struct sk_buff * dev_alloc_skb(unsigned int size);
extern void kfree_skbmem(struct sk_buff *skb);
extern struct sk_buff * skb_clone(struct sk_buff *skb, int priority);
extern struct sk_buff * skb_copy(struct sk_buff *skb, int priority);
extern struct sk_buff * skb_realloc_headroom(struct sk_buff *skb, int newheadroom);
#define dev_kfree_skb(a) kfree_skb(a)
-extern unsigned char * skb_put(struct sk_buff *skb, unsigned int len);
-extern unsigned char * skb_push(struct sk_buff *skb, unsigned int len);
-extern unsigned char * skb_pull(struct sk_buff *skb, unsigned int len);
-extern int skb_headroom(struct sk_buff *skb);
-extern int skb_tailroom(struct sk_buff *skb);
-extern void skb_reserve(struct sk_buff *skb, unsigned int len);
-extern void skb_trim(struct sk_buff *skb, unsigned int len);
extern void skb_over_panic(struct sk_buff *skb, int len, void *here);
extern void skb_under_panic(struct sk_buff *skb, int len, void *here);
/* Internal */
-extern __inline__ atomic_t *skb_datarefp(struct sk_buff *skb)
+static __inline__ atomic_t *skb_datarefp(struct sk_buff *skb)
{
return (atomic_t *)(skb->end);
}
-extern __inline__ int skb_queue_empty(struct sk_buff_head *list)
+static __inline__ int skb_queue_empty(struct sk_buff_head *list)
{
return (list->next == (struct sk_buff *) list);
}
-extern __inline__ void kfree_skb(struct sk_buff *skb)
+static __inline__ void kfree_skb(struct sk_buff *skb)
{
if (atomic_dec_and_test(&skb->users))
__kfree_skb(skb);
}
/* Use this if you didn't touch the skb state [for fast switching] */
-extern __inline__ void kfree_skb_fast(struct sk_buff *skb)
+static __inline__ void kfree_skb_fast(struct sk_buff *skb)
{
if (atomic_dec_and_test(&skb->users))
kfree_skbmem(skb);
}
-extern __inline__ int skb_cloned(struct sk_buff *skb)
+static __inline__ int skb_cloned(struct sk_buff *skb)
{
return skb->cloned && atomic_read(skb_datarefp(skb)) != 1;
}
-extern __inline__ int skb_shared(struct sk_buff *skb)
+static __inline__ int skb_shared(struct sk_buff *skb)
{
return (atomic_read(&skb->users) != 1);
}
@@ -201,7 +185,7 @@ extern __inline__ int skb_shared(struct sk_buff *skb)
* a packet thats being forwarded.
*/
-extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
+static __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
{
struct sk_buff *nskb;
if(!skb_cloned(skb))
@@ -218,7 +202,7 @@ extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
* type system cli() peek the buffer copy the data and sti();
*/
-extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
+static __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
{
struct sk_buff *list = ((struct sk_buff *)list_)->next;
if (list == (struct sk_buff *)list_)
@@ -226,7 +210,7 @@ extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
return list;
}
-extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
+static __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
{
struct sk_buff *list = ((struct sk_buff *)list_)->prev;
if (list == (struct sk_buff *)list_)
@@ -238,12 +222,12 @@ extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
* Return the length of an sk_buff queue
*/
-extern __inline__ __u32 skb_queue_len(struct sk_buff_head *list_)
+static __inline__ __u32 skb_queue_len(struct sk_buff_head *list_)
{
return(list_->qlen);
}
-extern __inline__ void skb_queue_head_init(struct sk_buff_head *list)
+static __inline__ void skb_queue_head_init(struct sk_buff_head *list)
{
list->prev = (struct sk_buff *)list;
list->next = (struct sk_buff *)list;
@@ -257,7 +241,7 @@ extern __inline__ void skb_queue_head_init(struct sk_buff_head *list)
* can only be called with interrupts disabled.
*/
-extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
{
struct sk_buff *prev, *next;
@@ -273,7 +257,7 @@ extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buf
extern spinlock_t skb_queue_lock;
-extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
@@ -286,7 +270,7 @@ extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff
* Insert an sk_buff at the end of a list.
*/
-extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
struct sk_buff *prev, *next;
@@ -300,7 +284,7 @@ extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buf
prev->next = newsk;
}
-extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
@@ -313,7 +297,7 @@ extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff
* Remove an sk_buff from a list.
*/
-extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
+static __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
{
struct sk_buff *next, *prev, *result;
@@ -333,7 +317,7 @@ extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
return result;
}
-extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
+static __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
{
long flags;
struct sk_buff *result;
@@ -348,7 +332,7 @@ extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
* Insert a packet on a list.
*/
-extern __inline__ void __skb_insert(struct sk_buff *newsk,
+static __inline__ void __skb_insert(struct sk_buff *newsk,
struct sk_buff * prev, struct sk_buff *next,
struct sk_buff_head * list)
{
@@ -363,7 +347,7 @@ extern __inline__ void __skb_insert(struct sk_buff *newsk,
/*
* Place a packet before a given packet in a list
*/
-extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
+static __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
{
unsigned long flags;
@@ -376,12 +360,12 @@ extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
* Place a packet after a given packet in a list.
*/
-extern __inline__ void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
+static __inline__ void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
{
__skb_insert(newsk, old, old->next, old->list);
}
-extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
+static __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
{
unsigned long flags;
@@ -394,7 +378,7 @@ extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
* remove sk_buff from list. _Must_ be called atomically, and with
* the list known..
*/
-extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
+static __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
{
struct sk_buff * next, * prev;
@@ -415,7 +399,7 @@ extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *li
* _FIRST_.
*/
-extern __inline__ void skb_unlink(struct sk_buff *skb)
+static __inline__ void skb_unlink(struct sk_buff *skb)
{
unsigned long flags;
@@ -426,7 +410,7 @@ extern __inline__ void skb_unlink(struct sk_buff *skb)
}
/* XXX: more streamlined implementation */
-extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
+static __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
{
struct sk_buff *skb = skb_peek_tail(list);
if (skb)
@@ -434,7 +418,7 @@ extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
return skb;
}
-extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
+static __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
{
long flags;
struct sk_buff *result;
@@ -449,7 +433,7 @@ extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
* Add data to an sk_buff
*/
-extern __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
@@ -457,7 +441,7 @@ extern __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len
return tmp;
}
-extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
@@ -471,14 +455,14 @@ here: ;
return tmp;
}
-extern __inline__ unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
return skb->data;
}
-extern __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
@@ -491,49 +475,49 @@ here: ;
return skb->data;
}
-extern __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
+static __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
{
skb->len-=len;
return skb->data+=len;
}
-extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
{
if (len > skb->len)
return NULL;
return __skb_pull(skb,len);
}
-extern __inline__ int skb_headroom(struct sk_buff *skb)
+static __inline__ int skb_headroom(struct sk_buff *skb)
{
return skb->data-skb->head;
}
-extern __inline__ int skb_tailroom(struct sk_buff *skb)
+static __inline__ int skb_tailroom(struct sk_buff *skb)
{
return skb->end-skb->tail;
}
-extern __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
+static __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
{
skb->data+=len;
skb->tail+=len;
}
-extern __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
+static __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
{
skb->len = len;
skb->tail = skb->data+len;
}
-extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
+static __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
{
if (skb->len > len) {
__skb_trim(skb, len);
}
}
-extern __inline__ void skb_orphan(struct sk_buff *skb)
+static __inline__ void skb_orphan(struct sk_buff *skb)
{
if (skb->destructor)
skb->destructor(skb);
@@ -541,14 +525,14 @@ extern __inline__ void skb_orphan(struct sk_buff *skb)
skb->sk = NULL;
}
-extern __inline__ void skb_queue_purge(struct sk_buff_head *list)
+static __inline__ void skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb=skb_dequeue(list))!=NULL)
kfree_skb(skb);
}
-extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
+static __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
{
struct sk_buff *skb;
@@ -558,7 +542,7 @@ extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
return skb;
}
-extern __inline__ struct sk_buff *
+static __inline__ struct sk_buff *
skb_cow(struct sk_buff *skb, unsigned int headroom)
{
headroom = (headroom+15)&~15;
diff --git a/pfinet/linux-src/include/linux/tqueue.h b/pfinet/linux-src/include/linux/tqueue.h
index d886f753..b75892b9 100644
--- a/pfinet/linux-src/include/linux/tqueue.h
+++ b/pfinet/linux-src/include/linux/tqueue.h
@@ -80,7 +80,7 @@ extern spinlock_t tqueue_lock;
/*
* queue_task
*/
-extern __inline__ void queue_task(struct tq_struct *bh_pointer,
+static __inline__ void queue_task(struct tq_struct *bh_pointer,
task_queue *bh_list)
{
if (!test_and_set_bit(0,&bh_pointer->sync)) {
@@ -95,7 +95,7 @@ extern __inline__ void queue_task(struct tq_struct *bh_pointer,
/*
* Call all "bottom halfs" on a given list.
*/
-extern __inline__ void run_task_queue(task_queue *list)
+static __inline__ void run_task_queue(task_queue *list)
{
if (*list) {
unsigned long flags;