patch-2.4.0-test9 linux/include/net/profile.h
Next file: linux/include/net/route.h
Previous file: linux/include/net/pkt_sched.h
Back to the patch index
Back to the overall index
- Lines: 136
- Date:
Mon Oct 2 11:01:18 2000
- Orig file:
v2.4.0-test8/linux/include/net/profile.h
- Orig date:
Fri Sep 8 12:52:42 2000
diff -u --recursive --new-file v2.4.0-test8/linux/include/net/profile.h linux/include/net/profile.h
@@ -31,12 +31,12 @@
#ifdef CONFIG_X86_TSC
-extern __inline__ void net_profile_stamp(struct timeval *pstamp)
+static inline void net_profile_stamp(struct timeval *pstamp)
{
rdtsc(pstamp->tv_usec, pstamp->tv_sec);
}
-extern __inline__ void net_profile_accumulate(struct timeval *entered,
+static inline void net_profile_accumulate(struct timeval *entered,
struct timeval *leaved,
struct timeval *acc)
{
@@ -52,7 +52,7 @@
"0" (acc->tv_usec), "1" (acc->tv_sec));
}
-extern __inline__ void net_profile_sub(struct timeval *sub,
+static inline void net_profile_sub(struct timeval *sub,
struct timeval *acc)
{
__asm__ __volatile__ ("subl %2,%0\n\t"
@@ -62,7 +62,7 @@
"0" (acc->tv_usec), "1" (acc->tv_sec));
}
-extern __inline__ void net_profile_add(struct timeval *add,
+static inline void net_profile_add(struct timeval *add,
struct timeval *acc)
{
__asm__ __volatile__ ("addl %2,%0\n\t"
@@ -80,7 +80,7 @@
/* On alpha cycle counter has only 32 bits :-( :-( */
-extern __inline__ void net_profile_stamp(struct timeval *pstamp)
+static inline void net_profile_stamp(struct timeval *pstamp)
{
__u32 result;
__asm__ __volatile__ ("rpcc %0" : "r="(result));
@@ -91,7 +91,7 @@
pstamp->tv_usec = alpha_lo;
}
-extern __inline__ void net_profile_accumulate(struct timeval *entered,
+static inline void net_profile_accumulate(struct timeval *entered,
struct timeval *leaved,
struct timeval *acc)
{
@@ -113,7 +113,7 @@
acc->tv_usec = usecs;
}
-extern __inline__ void net_profile_sub(struct timeval *entered,
+static inline void net_profile_sub(struct timeval *entered,
struct timeval *leaved)
{
time_t usecs = leaved->tv_usec - entered->tv_usec;
@@ -127,7 +127,7 @@
leaved->tv_usec = usecs;
}
-extern __inline__ void net_profile_add(struct timeval *entered, struct timeval *leaved)
+static inline void net_profile_add(struct timeval *entered, struct timeval *leaved)
{
time_t usecs = leaved->tv_usec + entered->tv_usec;
time_t secs = leaved->tv_sec + entered->tv_sec;
@@ -143,18 +143,18 @@
#else
-extern __inline__ void net_profile_stamp(struct timeval *pstamp)
+static inline void net_profile_stamp(struct timeval *pstamp)
{
/* Not "fast" counterpart! On architectures without
cpu clock "fast" routine is absolutely useless in this
situation. do_gettimeofday still says something on slow-slow-slow
- boxes, though it eats more cpu time than the sobject of
+ boxes, though it eats more cpu time than the subject of
investigation :-) :-)
*/
do_gettimeofday(pstamp);
}
-extern __inline__ void net_profile_accumulate(struct timeval *entered,
+static inline void net_profile_accumulate(struct timeval *entered,
struct timeval *leaved,
struct timeval *acc)
{
@@ -176,7 +176,7 @@
acc->tv_usec = usecs;
}
-extern __inline__ void net_profile_sub(struct timeval *entered,
+static inline void net_profile_sub(struct timeval *entered,
struct timeval *leaved)
{
time_t usecs = leaved->tv_usec - entered->tv_usec;
@@ -190,7 +190,7 @@
leaved->tv_usec = usecs;
}
-extern __inline__ void net_profile_add(struct timeval *entered, struct timeval *leaved)
+static inline void net_profile_add(struct timeval *entered, struct timeval *leaved)
{
time_t usecs = leaved->tv_usec + entered->tv_usec;
time_t secs = leaved->tv_sec + entered->tv_sec;
@@ -207,7 +207,7 @@
#endif
-extern __inline__ void net_profile_enter(struct net_profile_slot *s)
+static inline void net_profile_enter(struct net_profile_slot *s)
{
unsigned long flags;
@@ -220,7 +220,7 @@
restore_flags(flags);
}
-extern __inline__ void net_profile_leave_irq(struct net_profile_slot *s)
+static inline void net_profile_leave_irq(struct net_profile_slot *s)
{
unsigned long flags;
@@ -241,7 +241,7 @@
restore_flags(flags);
}
-extern __inline__ void net_profile_leave(struct net_profile_slot *s)
+static inline void net_profile_leave(struct net_profile_slot *s)
{
unsigned long flags;
save_flags(flags);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)