From 8c581cc643cda9f4725d133414157468a6f37a38 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Mon, 28 Nov 2005 23:35:35 +0000 Subject: [PATCH] inline -> __inline patch by Brezenbak - small modifications by me svn path=/trunk/; revision=19734 --- reactos/apps/utils/pice/module/shell.c | 2 +- .../boot/freeldr/freeldr/inffile/inffile.c | 10 +- reactos/boot/freeldr/freeldr/math/libgcc2.c | 4 +- reactos/drivers/fs/cdfs/fsctl.c | 2 +- .../drivers/lib/oskittcp/include/memtrack.h | 4 +- .../lib/oskittcp/include/oskitfreebsd.h | 2 +- reactos/drivers/lib/undis/include/ndishack.h | 4 +- reactos/drivers/lib/undis/ndis/compat.c | 4 +- reactos/drivers/net/tcpip/include/memtrack.h | 4 +- reactos/drivers/net/tcpip/include/tcpcore.h | 284 +++++++++--------- reactos/hal/halx86/include/apic.h | 8 +- reactos/hal/halx86/mp/apic.c | 14 +- reactos/include/win32k/float.h | 8 +- reactos/lib/adns/src/internal.h | 12 +- reactos/lib/advapi32/reg/reg.c | 2 +- reactos/lib/advapi32/sec/sid.c | 2 +- reactos/lib/dbghelp/path.c | 4 +- reactos/lib/dbghelp/stabs.c | 8 +- reactos/lib/dbghelp/stackframe.h | 4 +- reactos/lib/dbghelp/symbol.c | 6 +- reactos/lib/devenum/devenum_private.h | 4 +- reactos/lib/kjs/include/jsint.h | 18 +- reactos/lib/kjs/ksrc/alloc.c | 2 +- reactos/lib/kjs/ksrc/main.c | 2 +- reactos/lib/kjs/src/alloc.c | 2 +- reactos/lib/kjs/src/heap.c | 4 +- reactos/lib/kjs/src/main.c | 2 +- reactos/lib/rtl/qsort.c | 8 +- reactos/regtests/shared/regtests.h | 16 +- reactos/subsys/win32k/dib/dib16bpp.c | 2 +- reactos/subsys/win32k/dib/dib32bpp.c | 2 +- reactos/subsys/win32k/dib/dib8bpp.c | 2 +- reactos/subsys/win32k/eng/clip.c | 10 +- reactos/subsys/win32k/eng/xlate.c | 8 +- reactos/subsys/win32k/include/class.h | 4 +- reactos/subsys/win32k/include/msgqueue.h | 6 +- reactos/subsys/win32k/ntuser/class.c | 4 +- reactos/subsys/win32k/ntuser/object.c | 6 +- reactos/subsys/win32k/objects/bitmaps.c | 2 +- reactos/subsys/win32k/objects/gdiobj.c | 6 +- reactos/subsys/win32k/objects/region.c | 2 +- reactos/subsys/win32k/objects/text.c | 6 +- 42 files changed, 251 insertions(+), 255 deletions(-) diff --git a/reactos/apps/utils/pice/module/shell.c b/reactos/apps/utils/pice/module/shell.c index 555ef2d15cd..8e348899ca2 100644 --- a/reactos/apps/utils/pice/module/shell.c +++ b/reactos/apps/utils/pice/module/shell.c @@ -293,7 +293,7 @@ void ProcessBootParams(void) // bNoCtrlKeys() // //************************************************************************* -BOOLEAN inline bNoCtrlKeys(void) +BOOLEAN __inline bNoCtrlKeys(void) { return (!bControl && !bAlt && !bShift); } diff --git a/reactos/boot/freeldr/freeldr/inffile/inffile.c b/reactos/boot/freeldr/freeldr/inffile/inffile.c index 414186ded37..931d5ac1fcb 100644 --- a/reactos/boot/freeldr/freeldr/inffile/inffile.c +++ b/reactos/boot/freeldr/freeldr/inffile/inffile.c @@ -387,7 +387,7 @@ InfpCacheFindKeyLine (PINFCACHESECTION Section, /* push the current state on the parser stack */ -inline static void push_state( struct parser *parser, enum parser_state state ) +__inline static void push_state( struct parser *parser, enum parser_state state ) { // assert( parser->stack_pos < sizeof(parser->stack)/sizeof(parser->stack[0]) ); parser->stack[parser->stack_pos++] = state; @@ -395,7 +395,7 @@ inline static void push_state( struct parser *parser, enum parser_state state ) /* pop the current state */ -inline static void pop_state( struct parser *parser ) +__inline static void pop_state( struct parser *parser ) { // assert( parser->stack_pos ); parser->state = parser->stack[--parser->stack_pos]; @@ -403,7 +403,7 @@ inline static void pop_state( struct parser *parser ) /* set the parser state and return the previous one */ -inline static enum parser_state set_state( struct parser *parser, enum parser_state state ) +__inline static enum parser_state set_state( struct parser *parser, enum parser_state state ) { enum parser_state ret = parser->state; parser->state = state; @@ -412,14 +412,14 @@ inline static enum parser_state set_state( struct parser *parser, enum parser_st /* check if the pointer points to an end of file */ -inline static int is_eof( struct parser *parser, const CHAR *ptr ) +__inline static int is_eof( struct parser *parser, const CHAR *ptr ) { return (ptr >= parser->end || *ptr == CONTROL_Z); } /* check if the pointer points to an end of line */ -inline static int is_eol( struct parser *parser, const CHAR *ptr ) +__inline static int is_eol( struct parser *parser, const CHAR *ptr ) { return (ptr >= parser->end || *ptr == CONTROL_Z || diff --git a/reactos/boot/freeldr/freeldr/math/libgcc2.c b/reactos/boot/freeldr/freeldr/math/libgcc2.c index 7fcd53ca3ff..496fd2fa7a4 100644 --- a/reactos/boot/freeldr/freeldr/math/libgcc2.c +++ b/reactos/boot/freeldr/freeldr/math/libgcc2.c @@ -60,7 +60,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #if defined (L_negdi2) || defined (L_divdi3) || defined (L_moddi3) #if defined (L_divdi3) || defined (L_moddi3) -static inline +static __inline #endif DWtype __negdi2 (DWtype u) @@ -514,7 +514,7 @@ const UQItype __clz_tab[] = #if (defined (L_udivdi3) || defined (L_divdi3) || \ defined (L_umoddi3) || defined (L_moddi3)) -static inline +static __inline #endif UDWtype __udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp) diff --git a/reactos/drivers/fs/cdfs/fsctl.c b/reactos/drivers/fs/cdfs/fsctl.c index 672aa307405..05a977a7549 100644 --- a/reactos/drivers/fs/cdfs/fsctl.c +++ b/reactos/drivers/fs/cdfs/fsctl.c @@ -35,7 +35,7 @@ /* FUNCTIONS ****************************************************************/ -static inline +static __inline int msf_to_lba (BYTE m, BYTE s, BYTE f) { return (((m * 60) + s) * 75 + f) - 150; diff --git a/reactos/drivers/lib/oskittcp/include/memtrack.h b/reactos/drivers/lib/oskittcp/include/memtrack.h index bd741c68e59..d02fafa54b9 100644 --- a/reactos/drivers/lib/oskittcp/include/memtrack.h +++ b/reactos/drivers/lib/oskittcp/include/memtrack.h @@ -49,12 +49,12 @@ VOID TrackDumpFL( PCHAR File, DWORD Line ); #define TrackDump() TrackDumpFL(__FILE__,__LINE__) VOID TrackTag( DWORD Tag ); -static inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG Line ) { +static __inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG Line ) { PVOID Out = ExAllocatePool( type, size ); if( Out ) TrackWithTag( EXALLOC_TAG, Out, File, Line ); return Out; } -static inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) { +static __inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) { UntrackFL(File, Line, Data); ExFreePool(Data); } diff --git a/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h b/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h index a268af3ae58..1822533ef1b 100644 --- a/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h +++ b/reactos/drivers/lib/oskittcp/include/oskitfreebsd.h @@ -16,7 +16,7 @@ void *memset( void *dest, int c, size_t count ); #define bzero(x,y) memset(x,0,y) #define bcopy(src,dst,n) memcpy(dst,src,n) #ifdef _MSC_VER -static inline void panic ( const char* fmt, ... ) +static __inline void panic ( const char* fmt, ... ) { va_list arg; va_start(arg, fmt); diff --git a/reactos/drivers/lib/undis/include/ndishack.h b/reactos/drivers/lib/undis/include/ndishack.h index 201c78b4c9e..e111dbd6eb2 100644 --- a/reactos/drivers/lib/undis/include/ndishack.h +++ b/reactos/drivers/lib/undis/include/ndishack.h @@ -27,7 +27,7 @@ struct _RECURSIVE_MUTEX; * Entry = Pointer to the entry that is inserted in the lookaside list */ static -inline +__inline VOID ExFreeToNPagedLookasideList ( IN PNPAGED_LOOKASIDE_LIST Lookaside, @@ -54,7 +54,7 @@ ExFreeToNPagedLookasideList ( * Address of the allocated list entry */ static -inline +__inline PVOID ExAllocateFromNPagedLookasideList ( IN PNPAGED_LOOKASIDE_LIST Lookaside diff --git a/reactos/drivers/lib/undis/ndis/compat.c b/reactos/drivers/lib/undis/ndis/compat.c index cb600ff0d4b..17316db6ae0 100644 --- a/reactos/drivers/lib/undis/ndis/compat.c +++ b/reactos/drivers/lib/undis/ndis/compat.c @@ -73,7 +73,7 @@ ExInterlockedInsertTailList(PLIST_ENTRY ListHead, } static -inline +__inline PSINGLE_LIST_ENTRY PopEntrySList( PSLIST_HEADER ListHead @@ -93,7 +93,7 @@ PSINGLE_LIST_ENTRY static -inline +__inline VOID PushEntrySList ( PSLIST_HEADER ListHead, diff --git a/reactos/drivers/net/tcpip/include/memtrack.h b/reactos/drivers/net/tcpip/include/memtrack.h index 0b0cf97903d..401bfbfe161 100644 --- a/reactos/drivers/net/tcpip/include/memtrack.h +++ b/reactos/drivers/net/tcpip/include/memtrack.h @@ -40,12 +40,12 @@ VOID TrackDumpFL( PCHAR File, DWORD Line ); #define TrackDump() TrackDumpFL(__FILE__,__LINE__) VOID TrackTag( DWORD Tag ); -static inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG Line ) { +static __inline PVOID ExAllocatePoolX( POOL_TYPE type, SIZE_T size, PCHAR File, ULONG Line ) { PVOID Out = PoolAllocateBuffer( size ); if( Out ) TrackWithTag( EXALLOC_TAG, Out, File, Line ); return Out; } -static inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) { +static __inline VOID ExFreePoolX( PVOID Data, PCHAR File, ULONG Line ) { UntrackFL(File, Line, Data); PoolFreeBuffer(Data); } diff --git a/reactos/drivers/net/tcpip/include/tcpcore.h b/reactos/drivers/net/tcpip/include/tcpcore.h index 6c1b31f32ed..9478c817494 100755 --- a/reactos/drivers/net/tcpip/include/tcpcore.h +++ b/reactos/drivers/net/tcpip/include/tcpcore.h @@ -262,7 +262,7 @@ extern void skb_under_panic(struct sk_buff *skb, int len, void *here); * Returns true if the queue is empty, false otherwise. */ -static 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); } @@ -275,7 +275,7 @@ static inline int skb_queue_empty(struct sk_buff_head *list) * to the buffer. */ -static inline struct sk_buff *skb_get(struct sk_buff *skb) +static __inline struct sk_buff *skb_get(struct sk_buff *skb) { atomic_inc(&skb->users); return skb; @@ -294,14 +294,14 @@ static inline struct sk_buff *skb_get(struct sk_buff *skb) * hit zero. */ -static inline void kfree_skb(struct sk_buff *skb) +static __inline void kfree_skb(struct sk_buff *skb) { if (atomic_read(&skb->users) == 1 || atomic_dec_and_test(&skb->users)) __kfree_skb(skb); } /* Use this if you didn't touch the skb state [for fast switching] */ -static inline void kfree_skb_fast(struct sk_buff *skb) +static __inline void kfree_skb_fast(struct sk_buff *skb) { if (atomic_read(&skb->users) == 1 || atomic_dec_and_test(&skb->users)) kfree_skbmem(skb); @@ -316,7 +316,7 @@ static inline void kfree_skb_fast(struct sk_buff *skb) * shared data so must not be written to under normal circumstances. */ -static inline int skb_cloned(struct sk_buff *skb) +static __inline int skb_cloned(struct sk_buff *skb) { return skb->cloned && atomic_read(&skb_shinfo(skb)->dataref) != 1; } @@ -329,7 +329,7 @@ static inline int skb_cloned(struct sk_buff *skb) * buffer. */ -static inline int skb_shared(struct sk_buff *skb) +static __inline int skb_shared(struct sk_buff *skb) { return (atomic_read(&skb->users) != 1); } @@ -348,7 +348,7 @@ static inline int skb_shared(struct sk_buff *skb) * NULL is returned on a memory allocation failure. */ -static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) +static __inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) { if (skb_shared(skb)) { struct sk_buff *nskb; @@ -381,7 +381,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri) * %NULL is returned on a memory allocation failure. */ -static 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)) @@ -405,7 +405,7 @@ static inline struct sk_buff *skb_unshare(struct sk_buff *skb, int pri) * volatile. Use with caution. */ -static 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_) @@ -427,7 +427,7 @@ static inline struct sk_buff *skb_peek(struct sk_buff_head *list_) * volatile. Use with caution. */ -static 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_) @@ -442,12 +442,12 @@ static inline struct sk_buff *skb_peek_tail(struct sk_buff_head *list_) * Return the length of an &sk_buff queue. */ -static inline __u32 skb_queue_len(struct sk_buff_head *list_) +static __inline __u32 skb_queue_len(struct sk_buff_head *list_) { return(list_->qlen); } -static inline void skb_queue_head_init(struct sk_buff_head *list) +static __inline void skb_queue_head_init(struct sk_buff_head *list) { spin_lock_init(&list->lock); list->prev = (struct sk_buff *)list; @@ -473,7 +473,7 @@ static inline void skb_queue_head_init(struct sk_buff_head *list) * A buffer cannot be placed on two lists at the same time. */ -static 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; @@ -500,7 +500,7 @@ static inline void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *n * A buffer cannot be placed on two lists at the same time. */ -static 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; @@ -521,7 +521,7 @@ static inline void skb_queue_head(struct sk_buff_head *list, struct sk_buff *new */ -static 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; @@ -547,7 +547,7 @@ static inline void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *n * A buffer cannot be placed on two lists at the same time. */ -static 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; @@ -565,7 +565,7 @@ static inline void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *new * returned or %NULL if the list is empty. */ -static 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; @@ -594,7 +594,7 @@ static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) * returned or %NULL if the list is empty. */ -static inline struct sk_buff *skb_dequeue(struct sk_buff_head *list) +static __inline struct sk_buff *skb_dequeue(struct sk_buff_head *list) { unsigned long flags; struct sk_buff *result; @@ -609,7 +609,7 @@ static inline struct sk_buff *skb_dequeue(struct sk_buff_head *list) * Insert a packet on a list. */ -static 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) { @@ -631,7 +631,7 @@ static inline void __skb_insert(struct sk_buff *newsk, * A buffer cannot be placed on two lists at the same time. */ -static 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; @@ -644,7 +644,7 @@ static inline void skb_insert(struct sk_buff *old, struct sk_buff *newsk) * Place a packet after a given packet in a list. */ -static 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); } @@ -660,7 +660,7 @@ static 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) +static __inline void skb_append(struct sk_buff *old, struct sk_buff *newsk) { unsigned long flags; @@ -674,7 +674,7 @@ static inline void skb_append(struct sk_buff *old, struct sk_buff *newsk) * the list known.. */ -static 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; @@ -701,7 +701,7 @@ static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) * destroyed. */ -static inline void skb_unlink(struct sk_buff *skb) +static __inline void skb_unlink(struct sk_buff *skb) { struct sk_buff_head *list = skb->list; @@ -726,7 +726,7 @@ static inline void skb_unlink(struct sk_buff *skb) * returned or %NULL if the list is empty. */ -static 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) @@ -743,7 +743,7 @@ static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) * returned or %NULL if the list is empty. */ -static 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) { unsigned long flags; struct sk_buff *result; @@ -754,12 +754,12 @@ static inline struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list) return result; } -static inline int skb_is_nonlinear(const struct sk_buff *skb) +static __inline int skb_is_nonlinear(const struct sk_buff *skb) { return skb->data_len; } -static inline int skb_headlen(const struct sk_buff *skb) +static __inline int skb_headlen(const struct sk_buff *skb) { return skb->len - skb->data_len; } @@ -772,7 +772,7 @@ static inline int skb_headlen(const struct sk_buff *skb) * Add data to an sk_buff */ -static 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_LINEAR_ASSERT(skb); @@ -791,7 +791,7 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) * first byte of the extra data is returned. */ -static 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) { #if 0 unsigned char *tmp=skb->tail; @@ -807,7 +807,7 @@ return NULL; #endif } -static 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; @@ -824,7 +824,7 @@ static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) * panic. A pointer to the first byte of the extra data is returned. */ -static 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) { #if 0 skb->data-=len; @@ -838,7 +838,7 @@ static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len) #endif } -static 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; if (skb->len < skb->data_len) @@ -857,7 +857,7 @@ static inline char *__skb_pull(struct sk_buff *skb, unsigned int len) * the old data. */ -static 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; @@ -866,7 +866,7 @@ static inline unsigned char * skb_pull(struct sk_buff *skb, unsigned int len) extern unsigned char * __pskb_pull_tail(struct sk_buff *skb, int delta); -static inline char *__pskb_pull(struct sk_buff *skb, unsigned int len) +static __inline char *__pskb_pull(struct sk_buff *skb, unsigned int len) { if (len > skb_headlen(skb) && __pskb_pull_tail(skb, len-skb_headlen(skb)) == NULL) @@ -875,14 +875,14 @@ static inline char *__pskb_pull(struct sk_buff *skb, unsigned int len) return skb->data += len; } -static inline unsigned char * pskb_pull(struct sk_buff *skb, unsigned int len) +static __inline unsigned char * pskb_pull(struct sk_buff *skb, unsigned int len) { if (len > skb->len) return NULL; return __pskb_pull(skb,len); } -static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) +static __inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) { if (len <= skb_headlen(skb)) return 1; @@ -898,7 +898,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) * Return the number of bytes of free space at the head of an &sk_buff. */ -static inline int skb_headroom(const struct sk_buff *skb) +static __inline int skb_headroom(const struct sk_buff *skb) { return skb->data-skb->head; } @@ -910,7 +910,7 @@ static inline int skb_headroom(const struct sk_buff *skb) * Return the number of bytes of free space at the tail of an sk_buff */ -static inline int skb_tailroom(const struct sk_buff *skb) +static __inline int skb_tailroom(const struct sk_buff *skb) { return skb_is_nonlinear(skb) ? 0 : skb->end-skb->tail; } @@ -924,7 +924,7 @@ static inline int skb_tailroom(const struct sk_buff *skb) * room. This is only allowed for an empty buffer. */ -static 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; @@ -932,7 +932,7 @@ static inline void skb_reserve(struct sk_buff *skb, unsigned int len) extern int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc); -static 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->data_len) { skb->len = len; @@ -951,7 +951,7 @@ static inline void __skb_trim(struct sk_buff *skb, unsigned int len) * the buffer is already under the length specified it is not modified. */ -static 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); @@ -959,7 +959,7 @@ static inline void skb_trim(struct sk_buff *skb, unsigned int len) } -static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) +static __inline int __pskb_trim(struct sk_buff *skb, unsigned int len) { if (!skb->data_len) { skb->len = len; @@ -970,7 +970,7 @@ static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) } } -static inline int pskb_trim(struct sk_buff *skb, unsigned int len) +static __inline int pskb_trim(struct sk_buff *skb, unsigned int len) { if (len < skb->len) return __pskb_trim(skb, len); @@ -987,7 +987,7 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len) */ -static inline void skb_orphan(struct sk_buff *skb) +static __inline void skb_orphan(struct sk_buff *skb) { if (skb->destructor) skb->destructor(skb); @@ -1005,7 +1005,7 @@ static inline void skb_orphan(struct sk_buff *skb) */ -static 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) @@ -1022,7 +1022,7 @@ static inline void skb_queue_purge(struct sk_buff_head *list) */ -static 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) @@ -1042,7 +1042,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) * %NULL is returned in there is no free memory. */ -static inline struct sk_buff *__dev_alloc_skb(unsigned int length, +static __inline struct sk_buff *__dev_alloc_skb(unsigned int length, int gfp_mask) { struct sk_buff *skb; @@ -1066,7 +1066,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, * allocates memory it can be called from an interrupt. */ -static inline struct sk_buff *dev_alloc_skb(unsigned int length) +static __inline struct sk_buff *dev_alloc_skb(unsigned int length) { #if 0 return __dev_alloc_skb(length, GFP_ATOMIC); @@ -1088,7 +1088,7 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) * and at least @headroom of space at head. */ -static inline int +static __inline int skb_cow(struct sk_buff *skb, unsigned int headroom) { #if 0 @@ -1114,7 +1114,7 @@ skb_cow(struct sk_buff *skb, unsigned int headroom) * is returned and the old skb data released. */ int skb_linearize(struct sk_buff *skb, int gfp); -static inline void *kmap_skb_frag(const skb_frag_t *frag) +static __inline void *kmap_skb_frag(const skb_frag_t *frag) { #if 0 #ifdef CONFIG_HIGHMEM @@ -1129,7 +1129,7 @@ static inline void *kmap_skb_frag(const skb_frag_t *frag) #endif } -static inline void kunmap_skb_frag(void *vaddr) +static __inline void kunmap_skb_frag(void *vaddr) { #if 0 kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ); @@ -1162,13 +1162,13 @@ extern void skb_init(void); extern void skb_add_mtu(int mtu); #ifdef CONFIG_NETFILTER -static inline void +static __inline void nf_conntrack_put(struct nf_ct_info *nfct) { if (nfct && atomic_dec_and_test(&nfct->master->use)) nfct->master->destroy(nfct->master); } -static inline void +static __inline void nf_conntrack_get(struct nf_ct_info *nfct) { if (nfct) @@ -1733,12 +1733,12 @@ struct dst_ops #ifdef __KERNEL__ -static inline void dst_hold(struct dst_entry * dst) +static __inline void dst_hold(struct dst_entry * dst) { atomic_inc(&dst->__refcnt); } -static inline +static __inline struct dst_entry * dst_clone(struct dst_entry * dst) { if (dst) @@ -1746,7 +1746,7 @@ struct dst_entry * dst_clone(struct dst_entry * dst) return dst; } -static inline +static __inline void dst_release(struct dst_entry * dst) { if (dst) @@ -1757,7 +1757,7 @@ extern void * dst_alloc(struct dst_ops * ops); extern void __dst_free(struct dst_entry * dst); extern void dst_destroy(struct dst_entry * dst); -static inline +static __inline void dst_free(struct dst_entry * dst) { if (dst->obsolete > 1) @@ -1769,27 +1769,27 @@ void dst_free(struct dst_entry * dst) __dst_free(dst); } -static inline void dst_confirm(struct dst_entry *dst) +static __inline void dst_confirm(struct dst_entry *dst) { if (dst) neigh_confirm(dst->neighbour); } -static inline void dst_negative_advice(struct dst_entry **dst_p) +static __inline void dst_negative_advice(struct dst_entry **dst_p) { struct dst_entry * dst = *dst_p; if (dst && dst->ops->negative_advice) *dst_p = dst->ops->negative_advice(dst); } -static inline void dst_link_failure(struct sk_buff *skb) +static __inline void dst_link_failure(struct sk_buff *skb) { struct dst_entry * dst = skb->dst; if (dst && dst->ops && dst->ops->link_failure) dst->ops->link_failure(skb); } -static inline void dst_set_expires(struct dst_entry *dst, int timeout) +static __inline void dst_set_expires(struct dst_entry *dst, int timeout) { unsigned long expires = jiffies + timeout; @@ -1940,7 +1940,7 @@ extern int tcp_port_rover; extern struct sock *tcp_v4_lookup_listener(u32 addr, unsigned short hnum, int dif); /* These are AF independent. */ -static __inline__ int tcp_bhashfn(__u16 lport) +static __inline int tcp_bhashfn(__u16 lport) { return (lport & (tcp_bhash_size - 1)); } @@ -1992,7 +1992,7 @@ struct tcp_tw_bucket { extern kmem_cache_t *tcp_timewait_cachep; -static inline void tcp_tw_put(struct tcp_tw_bucket *tw) +static __inline void tcp_tw_put(struct tcp_tw_bucket *tw) { if (atomic_dec_and_test(&tw->refcnt)) { #ifdef INET_REFCNT_DEBUG @@ -2048,7 +2048,7 @@ extern void tcp_tw_deschedule(struct tcp_tw_bucket *tw); (!((__sk)->bound_dev_if) || ((__sk)->bound_dev_if == (__dif)))) /* These can have wildcards, don't try too hard. */ -static __inline__ int tcp_lhashfn(unsigned short num) +static __inline int tcp_lhashfn(unsigned short num) { #if 0 return num & (TCP_LHTABLE_SIZE - 1); @@ -2057,7 +2057,7 @@ static __inline__ int tcp_lhashfn(unsigned short num) #endif } -static __inline__ int tcp_sk_listen_hashfn(struct sock *sk) +static __inline int tcp_sk_listen_hashfn(struct sock *sk) { #if 0 return tcp_lhashfn(sk->num); @@ -2341,7 +2341,7 @@ extern kmem_cache_t *tcp_openreq_cachep; #define tcp_openreq_alloc() kmem_cache_alloc(tcp_openreq_cachep, SLAB_ATOMIC) #define tcp_openreq_fastfree(req) kmem_cache_free(tcp_openreq_cachep, req) -static inline void tcp_openreq_free(struct open_request *req) +static __inline void tcp_openreq_free(struct open_request *req) { req->class->destructor(req); tcp_openreq_fastfree(req); @@ -2477,17 +2477,17 @@ enum tcp_ack_state_t TCP_ACK_PUSHED= 4 }; -static inline void tcp_schedule_ack(struct tcp_opt *tp) +static __inline void tcp_schedule_ack(struct tcp_opt *tp) { tp->ack.pending |= TCP_ACK_SCHED; } -static inline int tcp_ack_scheduled(struct tcp_opt *tp) +static __inline int tcp_ack_scheduled(struct tcp_opt *tp) { return tp->ack.pending&TCP_ACK_SCHED; } -static __inline__ void tcp_dec_quickack_mode(struct tcp_opt *tp) +static __inline void tcp_dec_quickack_mode(struct tcp_opt *tp) { if (tp->ack.quick && --tp->ack.quick == 0) { /* Leaving quickack mode we deflate ATO. */ @@ -2497,12 +2497,12 @@ static __inline__ void tcp_dec_quickack_mode(struct tcp_opt *tp) extern void tcp_enter_quickack_mode(struct tcp_opt *tp); -static __inline__ void tcp_delack_init(struct tcp_opt *tp) +static __inline void tcp_delack_init(struct tcp_opt *tp) { memset(&tp->ack, 0, sizeof(tp->ack)); } -static inline void tcp_clear_options(struct tcp_opt *tp) +static __inline void tcp_clear_options(struct tcp_opt *tp) { tp->tstamp_ok = tp->sack_ok = tp->wscale_ok = tp->snd_wscale = 0; } @@ -2641,7 +2641,7 @@ typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, extern int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, sk_read_actor_t recv_actor); -static inline void tcp_clear_xmit_timer(struct sock *sk, int what) +static __inline void tcp_clear_xmit_timer(struct sock *sk, int what) { #if 0 struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; @@ -2677,7 +2677,7 @@ static inline void tcp_clear_xmit_timer(struct sock *sk, int what) /* * Reset the retransmission timer */ -static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long when) +static __inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long when) { #if 0 struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; @@ -2715,7 +2715,7 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long * and even PMTU discovery events into account. */ -static __inline__ unsigned int tcp_current_mss(struct sock *sk) +static __inline unsigned int tcp_current_mss(struct sock *sk) { #if 0 struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; @@ -2742,7 +2742,7 @@ static __inline__ unsigned int tcp_current_mss(struct sock *sk) * Underestimations are more easy to detect and fix by tcp_measure_rcv_mss(). */ -static inline void tcp_initialize_rcv_mss(struct sock *sk) +static __inline void tcp_initialize_rcv_mss(struct sock *sk) { #if 0 struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; @@ -2756,7 +2756,7 @@ static inline void tcp_initialize_rcv_mss(struct sock *sk) #endif } -static __inline__ void __tcp_fast_path_on(struct tcp_opt *tp, u32 snd_wnd) +static __inline void __tcp_fast_path_on(struct tcp_opt *tp, u32 snd_wnd) { #if 0 tp->pred_flags = htonl((tp->tcp_header_len << 26) | @@ -2765,14 +2765,14 @@ static __inline__ void __tcp_fast_path_on(struct tcp_opt *tp, u32 snd_wnd) #endif } -static __inline__ void tcp_fast_path_on(struct tcp_opt *tp) +static __inline void tcp_fast_path_on(struct tcp_opt *tp) { #if 0 __tcp_fast_path_on(tp, tp->snd_wnd>>tp->snd_wscale); #endif } -static inline void tcp_fast_path_check(struct sock *sk, struct tcp_opt *tp) +static __inline void tcp_fast_path_check(struct sock *sk, struct tcp_opt *tp) { #if 0 if (skb_queue_len(&tp->out_of_order_queue) == 0 && @@ -2787,7 +2787,7 @@ static inline void tcp_fast_path_check(struct sock *sk, struct tcp_opt *tp) * Rcv_nxt can be after the window if our peer push more data * than the offered window. */ -static __inline__ u32 tcp_receive_window(struct tcp_opt *tp) +static __inline u32 tcp_receive_window(struct tcp_opt *tp) { #if 0 s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt; @@ -2879,7 +2879,7 @@ struct tcp_skb_cb { /* * Compute minimal free write space needed to queue new packets. */ -static inline int tcp_min_write_space(struct sock *sk) +static __inline int tcp_min_write_space(struct sock *sk) { #if 0 return sk->wmem_queued/2; @@ -2888,7 +2888,7 @@ return 0; #endif } -static inline int tcp_wspace(struct sock *sk) +static __inline int tcp_wspace(struct sock *sk) { #if 0 return sk->sndbuf - sk->wmem_queued; @@ -2912,7 +2912,7 @@ return 0; * "Packets left network, but not honestly ACKed yet" PLUS * "Packets fast retransmitted" */ -static __inline__ unsigned int tcp_packets_in_flight(struct tcp_opt *tp) +static __inline unsigned int tcp_packets_in_flight(struct tcp_opt *tp) { #if 0 return tp->packets_out - tp->left_out + tp->retrans_out; @@ -2926,7 +2926,7 @@ static __inline__ unsigned int tcp_packets_in_flight(struct tcp_opt *tp) * one half the current congestion window, but no * less than two segments */ -static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) +static __inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) { #if 0 return max(tp->snd_cwnd >> 1U, 2U); @@ -2939,7 +2939,7 @@ static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) * The exception is rate halving phase, when cwnd is decreasing towards * ssthresh. */ -static inline __u32 tcp_current_ssthresh(struct tcp_opt *tp) +static __inline __u32 tcp_current_ssthresh(struct tcp_opt *tp) { #if 0 if ((1<ca_state)&(TCPF_CA_CWR|TCPF_CA_Recovery)) @@ -2953,7 +2953,7 @@ static inline __u32 tcp_current_ssthresh(struct tcp_opt *tp) #endif } -static inline void tcp_sync_left_out(struct tcp_opt *tp) +static __inline void tcp_sync_left_out(struct tcp_opt *tp) { #if 0 if (tp->sack_ok && tp->sacked_out >= tp->packets_out - tp->lost_out) @@ -2966,7 +2966,7 @@ extern void tcp_cwnd_application_limited(struct sock *sk); /* Congestion window validation. (RFC2861) */ -static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_opt *tp) +static __inline void tcp_cwnd_validate(struct sock *sk, struct tcp_opt *tp) { #if 0 if (tp->packets_out >= tp->snd_cwnd) { @@ -2985,7 +2985,7 @@ static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_opt *tp) } /* Set slow start threshould and cwnd not falling to slow start */ -static inline void __tcp_enter_cwr(struct tcp_opt *tp) +static __inline void __tcp_enter_cwr(struct tcp_opt *tp) { #if 0 tp->undo_marker = 0; @@ -2999,7 +2999,7 @@ static inline void __tcp_enter_cwr(struct tcp_opt *tp) #endif } -static inline void tcp_enter_cwr(struct tcp_opt *tp) +static __inline void tcp_enter_cwr(struct tcp_opt *tp) { #if 0 tp->prior_ssthresh = 0; @@ -3015,7 +3015,7 @@ extern __u32 tcp_init_cwnd(struct tcp_opt *tp); /* Slow start with delack produces 3 packets of burst, so that * it is safe "de facto". */ -static __inline__ __u32 tcp_max_burst(struct tcp_opt *tp) +static __inline __u32 tcp_max_burst(struct tcp_opt *tp) { return 3; } @@ -3030,7 +3030,7 @@ static __inline__ int tcp_minshall_check(struct tcp_opt *tp) #endif } -static __inline__ void tcp_minshall_update(struct tcp_opt *tp, int mss, struct sk_buff *skb) +static __inline void tcp_minshall_update(struct tcp_opt *tp, int mss, struct sk_buff *skb) { #if 0 if (skb->len < mss) @@ -3046,7 +3046,7 @@ static __inline__ void tcp_minshall_update(struct tcp_opt *tp, int mss, struct s With Minshall's modification: all sent small packets are ACKed. */ -static __inline__ int +static __inline int tcp_nagle_check(struct tcp_opt *tp, struct sk_buff *skb, unsigned mss_now, int nonagle) { #if 0 @@ -3064,7 +3064,7 @@ tcp_nagle_check(struct tcp_opt *tp, struct sk_buff *skb, unsigned mss_now, int n /* This checks if the data bearing packet SKB (usually tp->send_head) * should be put on the wire right now. */ -static __inline__ int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, +static __inline int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, unsigned cur_mss, int nonagle) { #if 0 @@ -3102,7 +3102,7 @@ static __inline__ int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, #endif } -static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_opt *tp) +static __inline void tcp_check_probe_timer(struct sock *sk, struct tcp_opt *tp) { #if 0 if (!tp->packets_out && !tp->pending) @@ -3110,7 +3110,7 @@ static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_opt *tp #endif } -static __inline__ int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb) +static __inline int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb) { #if 0 return (skb->next == (struct sk_buff*)&sk->write_queue); @@ -3123,7 +3123,7 @@ static __inline__ int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb) * TCP_CORK or attempt at coalescing tiny packets. * The socket must be locked by the caller. */ -static __inline__ void __tcp_push_pending_frames(struct sock *sk, +static __inline void __tcp_push_pending_frames(struct sock *sk, struct tcp_opt *tp, unsigned cur_mss, int nonagle) @@ -3142,7 +3142,7 @@ static __inline__ void __tcp_push_pending_frames(struct sock *sk, #endif } -static __inline__ void tcp_push_pending_frames(struct sock *sk, +static __inline void tcp_push_pending_frames(struct sock *sk, struct tcp_opt *tp) { #if 0 @@ -3150,7 +3150,7 @@ static __inline__ void tcp_push_pending_frames(struct sock *sk, #endif } -static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp) +static __inline int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp) { #if 0 struct sk_buff *skb = tp->send_head; @@ -3163,14 +3163,14 @@ static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_opt *tp) #endif } -static __inline__ void tcp_init_wl(struct tcp_opt *tp, u32 ack, u32 seq) +static __inline void tcp_init_wl(struct tcp_opt *tp, u32 ack, u32 seq) { #if 0 tp->snd_wl1 = seq; #endif } -static __inline__ void tcp_update_wl(struct tcp_opt *tp, u32 ack, u32 seq) +static __inline void tcp_update_wl(struct tcp_opt *tp, u32 ack, u32 seq) { #if 0 tp->snd_wl1 = seq; @@ -3183,7 +3183,7 @@ extern void tcp_destroy_sock(struct sock *sk); /* * Calculate(/check) TCP checksum */ -static __inline__ u16 tcp_v4_check(struct tcphdr *th, int len, +static __inline u16 tcp_v4_check(struct tcphdr *th, int len, unsigned long saddr, unsigned long daddr, unsigned long base) { @@ -3194,7 +3194,7 @@ static __inline__ u16 tcp_v4_check(struct tcphdr *th, int len, #endif } -static __inline__ int __tcp_checksum_complete(struct sk_buff *skb) +static __inline int __tcp_checksum_complete(struct sk_buff *skb) { #if 0 return (unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum)); @@ -3203,7 +3203,7 @@ static __inline__ int __tcp_checksum_complete(struct sk_buff *skb) #endif } -static __inline__ int tcp_checksum_complete(struct sk_buff *skb) +static __inline int tcp_checksum_complete(struct sk_buff *skb) { #if 0 return skb->ip_summed != CHECKSUM_UNNECESSARY && @@ -3215,7 +3215,7 @@ static __inline__ int tcp_checksum_complete(struct sk_buff *skb) /* Prequeue for VJ style copy to user, combined with checksumming. */ -static __inline__ void tcp_prequeue_init(struct tcp_opt *tp) +static __inline void tcp_prequeue_init(struct tcp_opt *tp) { #if 0 tp->ucopy.task = NULL; @@ -3233,7 +3233,7 @@ static __inline__ void tcp_prequeue_init(struct tcp_opt *tp) * * NOTE: is this not too big to inline? */ -static __inline__ int tcp_prequeue(struct sock *sk, struct sk_buff *skb) +static __inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) { #if 0 struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; @@ -3277,7 +3277,7 @@ static char *statename[]={ }; #endif -static __inline__ void tcp_set_state(struct sock *sk, int state) +static __inline void tcp_set_state(struct sock *sk, int state) { #if 0 int oldstate = sk->state; @@ -3309,7 +3309,7 @@ static __inline__ void tcp_set_state(struct sock *sk, int state) #endif } -static __inline__ void tcp_done(struct sock *sk) +static __inline void tcp_done(struct sock *sk) { #if 0 tcp_set_state(sk, TCP_CLOSE); @@ -3324,7 +3324,7 @@ static __inline__ void tcp_done(struct sock *sk) #endif } -static __inline__ void tcp_sack_reset(struct tcp_opt *tp) +static __inline void tcp_sack_reset(struct tcp_opt *tp) { #if 0 tp->dsack = 0; @@ -3333,7 +3333,7 @@ static __inline__ void tcp_sack_reset(struct tcp_opt *tp) #endif } -static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt *tp, __u32 tstamp) +static __inline void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt *tp, __u32 tstamp) { #if 0 if (tp->tstamp_ok) { @@ -3370,7 +3370,7 @@ static __inline__ void tcp_build_and_update_options(__u32 *ptr, struct tcp_opt * * MAX_SYN_SIZE to match the new maximum number of options that you * can generate. */ -static inline void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sack, +static __inline void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sack, int offer_wscale, int wscale, __u32 tstamp, __u32 ts_recent) { #if 0 @@ -3412,7 +3412,7 @@ static inline void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sack, * be a multiple of mss if possible. We assume here that mss >= 1. * This MUST be enforced by all callers. */ -static inline void tcp_select_initial_window(int __space, __u32 mss, +static __inline void tcp_select_initial_window(int __space, __u32 mss, __u32 *rcv_wnd, __u32 *window_clamp, int wscale_ok, @@ -3467,7 +3467,7 @@ static inline void tcp_select_initial_window(int __space, __u32 mss, #endif } -static inline int tcp_win_from_space(int space) +static __inline int tcp_win_from_space(int space) { #if 0 return sysctl_tcp_adv_win_scale<=0 ? @@ -3479,7 +3479,7 @@ static inline int tcp_win_from_space(int space) } /* Note: caller must be prepared to deal with negative returns */ -static inline int tcp_space(struct sock *sk) +static __inline int tcp_space(struct sock *sk) { #if 0 return tcp_win_from_space(sk->rcvbuf - atomic_read(&sk->rmem_alloc)); @@ -3488,7 +3488,7 @@ static inline int tcp_space(struct sock *sk) #endif } -static inline int tcp_full_space( struct sock *sk) +static __inline int tcp_full_space( struct sock *sk) { #if 0 return tcp_win_from_space(sk->rcvbuf); @@ -3497,21 +3497,21 @@ static inline int tcp_full_space( struct sock *sk) #endif } -static inline void tcp_acceptq_removed(struct sock *sk) +static __inline void tcp_acceptq_removed(struct sock *sk) { #if 0 sk->ack_backlog--; #endif } -static inline void tcp_acceptq_added(struct sock *sk) +static __inline void tcp_acceptq_added(struct sock *sk) { #if 0 sk->ack_backlog++; #endif } -static inline int tcp_acceptq_is_full(struct sock *sk) +static __inline int tcp_acceptq_is_full(struct sock *sk) { #if 0 return sk->ack_backlog > sk->max_ack_backlog; @@ -3520,7 +3520,7 @@ static inline int tcp_acceptq_is_full(struct sock *sk) #endif } -static inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req, +static __inline void tcp_acceptq_queue(struct sock *sk, struct open_request *req, struct sock *child) { #if 0 @@ -3548,7 +3548,7 @@ struct tcp_listen_opt struct open_request *syn_table[TCP_SYNQ_HSIZE]; }; -static inline void +static __inline void tcp_synq_removed(struct sock *sk, struct open_request *req) { #if 0 @@ -3561,7 +3561,7 @@ tcp_synq_removed(struct sock *sk, struct open_request *req) #endif } -static inline void tcp_synq_added(struct sock *sk) +static __inline void tcp_synq_added(struct sock *sk) { #if 0 struct tcp_listen_opt *lopt = sk->tp_pinfo.af_tcp.listen_opt; @@ -3572,7 +3572,7 @@ static inline void tcp_synq_added(struct sock *sk) #endif } -static inline int tcp_synq_len(struct sock *sk) +static __inline int tcp_synq_len(struct sock *sk) { #if 0 return sk->tp_pinfo.af_tcp.listen_opt->qlen; @@ -3581,7 +3581,7 @@ static inline int tcp_synq_len(struct sock *sk) #endif } -static inline int tcp_synq_young(struct sock *sk) +static __inline int tcp_synq_young(struct sock *sk) { #if 0 return sk->tp_pinfo.af_tcp.listen_opt->qlen_young; @@ -3590,7 +3590,7 @@ static inline int tcp_synq_young(struct sock *sk) #endif } -static inline int tcp_synq_is_full(struct sock *sk) +static __inline int tcp_synq_is_full(struct sock *sk) { #if 0 return tcp_synq_len(sk)>>sk->tp_pinfo.af_tcp.listen_opt->max_qlen_log; @@ -3599,7 +3599,7 @@ static inline int tcp_synq_is_full(struct sock *sk) #endif } -static inline void tcp_synq_unlink(struct tcp_opt *tp, struct open_request *req, +static __inline void tcp_synq_unlink(struct tcp_opt *tp, struct open_request *req, struct open_request **prev) { #if 0 @@ -3609,7 +3609,7 @@ static inline void tcp_synq_unlink(struct tcp_opt *tp, struct open_request *req, #endif } -static inline void tcp_synq_drop(struct sock *sk, struct open_request *req, +static __inline void tcp_synq_drop(struct sock *sk, struct open_request *req, struct open_request **prev) { #if 0 @@ -3619,7 +3619,7 @@ static inline void tcp_synq_drop(struct sock *sk, struct open_request *req, #endif } -static __inline__ void tcp_openreq_init(struct open_request *req, +static __inline void tcp_openreq_init(struct open_request *req, struct tcp_opt *tp, struct sk_buff *skb) { @@ -3640,7 +3640,7 @@ static __inline__ void tcp_openreq_init(struct open_request *req, #define TCP_MEM_QUANTUM ((int)PAGE_SIZE) -static inline void tcp_free_skb(struct sock *sk, struct sk_buff *skb) +static __inline void tcp_free_skb(struct sock *sk, struct sk_buff *skb) { #if 0 sk->tp_pinfo.af_tcp.queue_shrunk = 1; @@ -3650,7 +3650,7 @@ static inline void tcp_free_skb(struct sock *sk, struct sk_buff *skb) #endif } -static inline void tcp_charge_skb(struct sock *sk, struct sk_buff *skb) +static __inline void tcp_charge_skb(struct sock *sk, struct sk_buff *skb) { #if 0 sk->wmem_queued += skb->truesize; @@ -3661,7 +3661,7 @@ static inline void tcp_charge_skb(struct sock *sk, struct sk_buff *skb) extern void __tcp_mem_reclaim(struct sock *sk); extern int tcp_mem_schedule(struct sock *sk, int size, int kind); -static inline void tcp_mem_reclaim(struct sock *sk) +static __inline void tcp_mem_reclaim(struct sock *sk) { #if 0 if (sk->forward_alloc >= TCP_MEM_QUANTUM) @@ -3669,7 +3669,7 @@ static inline void tcp_mem_reclaim(struct sock *sk) #endif } -static inline void tcp_enter_memory_pressure(void) +static __inline void tcp_enter_memory_pressure(void) { #if 0 if (!tcp_memory_pressure) { @@ -3679,7 +3679,7 @@ static inline void tcp_enter_memory_pressure(void) #endif } -static inline void tcp_moderate_sndbuf(struct sock *sk) +static __inline void tcp_moderate_sndbuf(struct sock *sk) { #if 0 if (!(sk->userlocks&SOCK_SNDBUF_LOCK)) { @@ -3689,7 +3689,7 @@ static inline void tcp_moderate_sndbuf(struct sock *sk) #endif } -static inline struct sk_buff *tcp_alloc_pskb(struct sock *sk, int size, int mem, int gfp) +static __inline struct sk_buff *tcp_alloc_pskb(struct sock *sk, int size, int mem, int gfp) { #if 0 struct sk_buff *skb = alloc_skb(size+MAX_TCP_HEADER, gfp); @@ -3712,7 +3712,7 @@ static inline struct sk_buff *tcp_alloc_pskb(struct sock *sk, int size, int mem, #endif } -static inline struct sk_buff *tcp_alloc_skb(struct sock *sk, int size, int gfp) +static __inline struct sk_buff *tcp_alloc_skb(struct sock *sk, int size, int gfp) { #if 0 return tcp_alloc_pskb(sk, size, 0, gfp); @@ -3721,7 +3721,7 @@ static inline struct sk_buff *tcp_alloc_skb(struct sock *sk, int size, int gfp) #endif } -static inline struct page * tcp_alloc_page(struct sock *sk) +static __inline struct page * tcp_alloc_page(struct sock *sk) { #if 0 if (sk->forward_alloc >= (int)PAGE_SIZE || @@ -3738,7 +3738,7 @@ static inline struct page * tcp_alloc_page(struct sock *sk) #endif } -static inline void tcp_writequeue_purge(struct sock *sk) +static __inline void tcp_writequeue_purge(struct sock *sk) { #if 0 struct sk_buff *skb; @@ -3751,7 +3751,7 @@ static inline void tcp_writequeue_purge(struct sock *sk) extern void tcp_rfree(struct sk_buff *skb); -static inline void tcp_set_owner_r(struct sk_buff *skb, struct sock *sk) +static __inline void tcp_set_owner_r(struct sk_buff *skb, struct sock *sk) { #if 0 skb->sk = sk; @@ -3768,7 +3768,7 @@ extern void tcp_listen_wlock(void); * use plain read_(un)lock(&tcp_lhash_lock). */ -static inline void tcp_listen_lock(void) +static __inline void tcp_listen_lock(void) { #if 0 /* read_lock synchronizes to candidates to writers */ @@ -3778,7 +3778,7 @@ static inline void tcp_listen_lock(void) #endif } -static inline void tcp_listen_unlock(void) +static __inline void tcp_listen_unlock(void) { #if 0 if (atomic_dec_and_test(&tcp_lhash_users)) @@ -3786,7 +3786,7 @@ static inline void tcp_listen_unlock(void) #endif } -static inline int keepalive_intvl_when(struct tcp_opt *tp) +static __inline int keepalive_intvl_when(struct tcp_opt *tp) { #if 0 return tp->keepalive_intvl ? : sysctl_tcp_keepalive_intvl; @@ -3795,7 +3795,7 @@ static inline int keepalive_intvl_when(struct tcp_opt *tp) #endif } -static inline int keepalive_time_when(struct tcp_opt *tp) +static __inline int keepalive_time_when(struct tcp_opt *tp) { #if 0 return tp->keepalive_time ? : sysctl_tcp_keepalive_time; @@ -3804,7 +3804,7 @@ static inline int keepalive_time_when(struct tcp_opt *tp) #endif } -static inline int tcp_fin_time(struct tcp_opt *tp) +static __inline int tcp_fin_time(struct tcp_opt *tp) { #if 0 int fin_timeout = tp->linger2 ? : sysctl_tcp_fin_timeout; @@ -3818,7 +3818,7 @@ static inline int tcp_fin_time(struct tcp_opt *tp) #endif } -static inline int tcp_paws_check(struct tcp_opt *tp, int rst) +static __inline int tcp_paws_check(struct tcp_opt *tp, int rst) { #if 0 if ((s32)(tp->rcv_tsval - tp->ts_recent) >= 0) diff --git a/reactos/hal/halx86/include/apic.h b/reactos/hal/halx86/include/apic.h index b60d4df3153..7454c210f72 100644 --- a/reactos/hal/halx86/include/apic.h +++ b/reactos/hal/halx86/include/apic.h @@ -191,17 +191,17 @@ extern CPU_INFO CPUMap[MAX_CPU]; /* Map of all CPUs in the system */ /* Prototypes */ -inline VOID APICWrite(ULONG Offset, ULONG Value); -inline ULONG APICRead(ULONG Offset); +__inline VOID APICWrite(ULONG Offset, ULONG Value); +__inline ULONG APICRead(ULONG Offset); VOID APICSendIPI(ULONG Target, ULONG Mode); VOID APICSetup(VOID); VOID HaliInitBSP(VOID); VOID APICSyncArbIDs(VOID); -inline VOID APICSendEOI(VOID); +__inline VOID APICSendEOI(VOID); VOID APICCalibrateTimer(ULONG CPU); VOID HaliStartApplicationProcessor(ULONG Cpu, ULONG Stack); -static inline ULONG ThisCPU(VOID) +static __inline ULONG ThisCPU(VOID) { return (APICRead(APIC_ID) & APIC_ID_MASK) >> 24; } diff --git a/reactos/hal/halx86/mp/apic.c b/reactos/hal/halx86/mp/apic.c index 8f8310ebba4..fc9436b658c 100644 --- a/reactos/hal/halx86/mp/apic.c +++ b/reactos/hal/halx86/mp/apic.c @@ -181,7 +181,7 @@ VOID EnableApicMode(VOID) } /* Disable symetric I/O mode ie. go to PIC mode */ -inline VOID DisableSMPMode(VOID) +__inline VOID DisableSMPMode(VOID) { /* * Put the board back into PIC mode (has an effect @@ -221,7 +221,7 @@ VOID APICDisable(VOID) } -inline ULONG _APICRead(ULONG Offset) +__inline ULONG _APICRead(ULONG Offset) { PULONG p; @@ -230,7 +230,7 @@ inline ULONG _APICRead(ULONG Offset) } #if 0 -inline VOID APICWrite(ULONG Offset, +__inline VOID APICWrite(ULONG Offset, ULONG Value) { PULONG p; @@ -240,7 +240,7 @@ inline VOID APICWrite(ULONG Offset, *p = Value; } #else -inline VOID APICWrite(ULONG Offset, +__inline VOID APICWrite(ULONG Offset, ULONG Value) { PULONG p; @@ -257,7 +257,7 @@ inline VOID APICWrite(ULONG Offset, #if 0 -inline ULONG APICRead(ULONG Offset) +__inline ULONG APICRead(ULONG Offset) { PULONG p; @@ -265,7 +265,7 @@ inline ULONG APICRead(ULONG Offset) return *p; } #else -inline ULONG APICRead(ULONG Offset) +__inline ULONG APICRead(ULONG Offset) { PULONG p; ULONG CPU = (_APICRead(APIC_ID) & APIC_ID_MASK) >> 24; @@ -280,7 +280,7 @@ inline ULONG APICRead(ULONG Offset) } #endif -inline VOID APICSendEOI(VOID) +__inline VOID APICSendEOI(VOID) { // Send the EOI APICWrite(APIC_EOI, 0); diff --git a/reactos/include/win32k/float.h b/reactos/include/win32k/float.h index 37f83f62ca5..84f9968e4df 100644 --- a/reactos/include/win32k/float.h +++ b/reactos/include/win32k/float.h @@ -15,7 +15,7 @@ typedef struct tagFLOAT_POINT * transformation process is done in floating point internally. This function * is then used to round these coordinates to integer values. */ -static inline INT GDI_ROUND(FLOAT val) +static __inline INT GDI_ROUND(FLOAT val) { return (int)floor(val + 0.5); } @@ -23,7 +23,7 @@ static inline INT GDI_ROUND(FLOAT val) /* Performs a world-to-viewport transformation on the specified point (which * is in floating point format). */ -static inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point) +static __inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point) { FLOAT x, y; @@ -42,7 +42,7 @@ static inline void INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point) * is in integer format). Returns TRUE if successful, else FALSE. */ #if 0 -static inline BOOL INTERNAL_DPTOLP(DC *dc, LPPOINT point) +static __inline BOOL INTERNAL_DPTOLP(DC *dc, LPPOINT point) { FLOAT_POINT floatPoint; @@ -62,7 +62,7 @@ static inline BOOL INTERNAL_DPTOLP(DC *dc, LPPOINT point) /* Performs a world-to-viewport transformation on the specified point (which * is in integer format). */ -static inline void INTERNAL_LPTODP(DC *dc, LPPOINT point) +static __inline void INTERNAL_LPTODP(DC *dc, LPPOINT point) { FLOAT_POINT floatPoint; diff --git a/reactos/lib/adns/src/internal.h b/reactos/lib/adns/src/internal.h index b1043536185..3b9a68f76cf 100644 --- a/reactos/lib/adns/src/internal.h +++ b/reactos/lib/adns/src/internal.h @@ -690,17 +690,17 @@ void adns__consistency(adns_state ads, adns_query qu, consistency_checks cc); /* Useful static inline functions: */ -static inline int ctype_whitespace(int c) { return c==' ' || c=='\n' || c=='\t'; } -static inline int ctype_digit(int c) { return c>='0' && c<='9'; } -static inline int ctype_alpha(int c) { +static __inline int ctype_whitespace(int c) { return c==' ' || c=='\n' || c=='\t'; } +static __inline int ctype_digit(int c) { return c>='0' && c<='9'; } +static __inline int ctype_alpha(int c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } -static inline int ctype_822special(int c) { return strchr("()<>@,;:\\\".[]",c) != 0; } -static inline int ctype_domainunquoted(int c) { +static __inline int ctype_822special(int c) { return strchr("()<>@,;:\\\".[]",c) != 0; } +static __inline int ctype_domainunquoted(int c) { return ctype_alpha(c) || ctype_digit(c) || (strchr("-_/+",c) != 0); } -static inline int errno_resources(int e) { return e==ENOMEM || e==ENOBUFS; } +static __inline int errno_resources(int e) { return e==ENOMEM || e==ENOBUFS; } /* Useful macros */ diff --git a/reactos/lib/advapi32/reg/reg.c b/reactos/lib/advapi32/reg/reg.c index a9e5540dd24..2458badd8ae 100644 --- a/reactos/lib/advapi32/reg/reg.c +++ b/reactos/lib/advapi32/reg/reg.c @@ -52,7 +52,7 @@ static NTSTATUS OpenCurrentConfigKey(PHANDLE KeyHandle); /* FUNCTIONS ****************************************************************/ /* check if value type needs string conversion (Ansi<->Unicode) */ -inline static int is_string( DWORD type ) +__inline static int is_string( DWORD type ) { return (type == REG_SZ) || (type == REG_EXPAND_SZ) || (type == REG_MULTI_SZ); } diff --git a/reactos/lib/advapi32/sec/sid.c b/reactos/lib/advapi32/sec/sid.c index 048b76618df..3462a33f13b 100644 --- a/reactos/lib/advapi32/sec/sid.c +++ b/reactos/lib/advapi32/sec/sid.c @@ -70,7 +70,7 @@ static const WCHAR SDDL_AUDIT_FAILURE[] = {'F','A',0}; /* set last error code from NT status and get the proper boolean return value */ /* used for functions that are a simple wrapper around the corresponding ntdll API */ -static inline BOOL set_ntstatus( NTSTATUS status ) +static __inline BOOL set_ntstatus( NTSTATUS status ) { if (status) SetLastError( RtlNtStatusToDosError( status )); return !status; diff --git a/reactos/lib/dbghelp/path.c b/reactos/lib/dbghelp/path.c index 604998fde3e..f316f9c75df 100644 --- a/reactos/lib/dbghelp/path.c +++ b/reactos/lib/dbghelp/path.c @@ -28,9 +28,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); -static inline BOOL is_sep(char ch) {return ch == '/' || ch == '\\';} +static __inline BOOL is_sep(char ch) {return ch == '/' || ch == '\\';} -static inline char* file_name(char* str) +static __inline char* file_name(char* str) { char* p; diff --git a/reactos/lib/dbghelp/stabs.c b/reactos/lib/dbghelp/stabs.c index 0104fdd9829..b6b93b3201f 100644 --- a/reactos/lib/dbghelp/stabs.c +++ b/reactos/lib/dbghelp/stabs.c @@ -530,7 +530,7 @@ static int stabs_pts_read_range(struct ParseTypedefData* ptd, const char* typena return 0; } -static inline int stabs_pts_read_method_info(struct ParseTypedefData* ptd) +static __inline int stabs_pts_read_method_info(struct ParseTypedefData* ptd) { struct symt* dt; char* tmp; @@ -570,7 +570,7 @@ static inline int stabs_pts_read_method_info(struct ParseTypedefData* ptd) return 0; } -static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, +static __inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, struct symt_udt* sdt) { long sz, ofs; @@ -716,7 +716,7 @@ static inline int stabs_pts_read_aggregate(struct ParseTypedefData* ptd, return 0; } -static inline int stabs_pts_read_enum(struct ParseTypedefData* ptd, +static __inline int stabs_pts_read_enum(struct ParseTypedefData* ptd, struct symt_enum* edt) { long value; @@ -735,7 +735,7 @@ static inline int stabs_pts_read_enum(struct ParseTypedefData* ptd, return 0; } -static inline int stabs_pts_read_array(struct ParseTypedefData* ptd, +static __inline int stabs_pts_read_array(struct ParseTypedefData* ptd, struct symt** adt) { long lo, hi; diff --git a/reactos/lib/dbghelp/stackframe.h b/reactos/lib/dbghelp/stackframe.h index 63dd983c161..c9af8220ea9 100644 --- a/reactos/lib/dbghelp/stackframe.h +++ b/reactos/lib/dbghelp/stackframe.h @@ -71,9 +71,9 @@ typedef struct _STACK16FRAME #include -static inline int MapSL(int size) +static __inline int MapSL(int size) { -return -1; + return -1; } #define CURRENT_STACK16 ((STACK16FRAME*)MapSL(NtCurrentTeb()->cur_stack)) diff --git a/reactos/lib/dbghelp/symbol.c b/reactos/lib/dbghelp/symbol.c index 30c390c6689..e85bb23aad8 100644 --- a/reactos/lib/dbghelp/symbol.c +++ b/reactos/lib/dbghelp/symbol.c @@ -54,14 +54,14 @@ struct line_info } u; }; -inline static int cmp_addr(ULONG64 a1, ULONG64 a2) +__inline static int cmp_addr(ULONG64 a1, ULONG64 a2) { if (a1 > a2) return 1; if (a1 < a2) return -1; return 0; } -inline static int cmp_sorttab_addr(const struct module* module, int idx, ULONG64 addr) +__inline static int cmp_sorttab_addr(const struct module* module, int idx, ULONG64 addr) { ULONG64 ref; @@ -80,7 +80,7 @@ int symt_cmp_addr(const void* p1, const void* p2) return cmp_addr(a1, a2); } -static inline void re_append(char** mask, unsigned* len, char ch) +static __inline void re_append(char** mask, unsigned* len, char ch) { *mask = HeapReAlloc(GetProcessHeap(), 0, *mask, ++(*len)); (*mask)[*len - 2] = ch; diff --git a/reactos/lib/devenum/devenum_private.h b/reactos/lib/devenum/devenum_private.h index 6d802b3a138..5ee8da6a753 100644 --- a/reactos/lib/devenum/devenum_private.h +++ b/reactos/lib/devenum/devenum_private.h @@ -42,8 +42,8 @@ * Dll lifetime tracking declaration for devenum.dll */ extern LONG dll_refs; -static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); } -static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); } +static __inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); } +static __inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); } /********************************************************************** diff --git a/reactos/lib/kjs/include/jsint.h b/reactos/lib/kjs/include/jsint.h index 6350b54db56..deab0f975f4 100644 --- a/reactos/lib/kjs/include/jsint.h +++ b/reactos/lib/kjs/include/jsint.h @@ -1366,7 +1366,7 @@ JSSymbol js_vm_intern_with_len (JSVirtualMachine *vm, const char *name, unsigned int len); /* Intern symbol to virtual machine and return its JSSymbol id. */ -static inline JSSymbol +static __inline JSSymbol js_vm_intern (JSVirtualMachine *vm, const char *name) { return js_vm_intern_with_len (vm, name, strlen (name)); @@ -1424,7 +1424,7 @@ void js_vm_error (JSVirtualMachine *vm); * hash value should be re-mapped to the correct range, for example, * with the mod operand. */ -static inline unsigned int +static __inline unsigned int js_count_hash (const char *data, unsigned int data_len) { unsigned int val = 0, i; @@ -1509,7 +1509,7 @@ int js_vm_is_marked_ptr (void *ptr); /* Function. */ -static inline JSFunction * +static __inline JSFunction * js_vm_make_function (JSVirtualMachine *vm, void *implementation) { JSFunction *f = (JSFunction *) js_vm_alloc (vm, sizeof (*f)); @@ -1532,7 +1532,7 @@ void js_vm_builtin_create (JSVirtualMachine *vm, JSNode *result, /* Array. */ -static inline void +static __inline void js_vm_make_array (JSVirtualMachine *vm, JSNode *n, unsigned int length) { unsigned int i; @@ -1547,7 +1547,7 @@ js_vm_make_array (JSVirtualMachine *vm, JSNode *n, unsigned int length) n->u.varray->data[i].type = JS_UNDEFINED; } -static inline void +static __inline void js_vm_expand_array (JSVirtualMachine *vm, JSNode *n, unsigned int length) { if (n->u.varray->length < length) @@ -1648,7 +1648,7 @@ void js_vm_stacktrace (JSVirtualMachine *vm, unsigned int num_frames); /* Strings. */ -static inline void +static __inline void js_vm_make_string (JSVirtualMachine *vm, JSNode *n, const char *data, unsigned int data_len) { @@ -1664,7 +1664,7 @@ js_vm_make_string (JSVirtualMachine *vm, JSNode *n, const char *data, } -static inline void +static __inline void js_vm_make_static_string (JSVirtualMachine *vm, JSNode *n, const char *data, unsigned int data_len) { @@ -1677,7 +1677,7 @@ js_vm_make_static_string (JSVirtualMachine *vm, JSNode *n, const char *data, } -static inline int +static __inline int js_compare_strings (JSNode *a, JSNode *b) { unsigned int i; @@ -1698,7 +1698,7 @@ js_compare_strings (JSNode *a, JSNode *b) } -static inline char * +static __inline char * js_string_to_c_string (JSVirtualMachine *vm, const JSNode *a) { char *cp; diff --git a/reactos/lib/kjs/ksrc/alloc.c b/reactos/lib/kjs/ksrc/alloc.c index 227cfeae9e9..6fde9db7286 100644 --- a/reactos/lib/kjs/ksrc/alloc.c +++ b/reactos/lib/kjs/ksrc/alloc.c @@ -97,7 +97,7 @@ unregister_block (MemDebug *b) } -static inline int +static __inline int check_fail () { return alloc_fail != 0 && ++alloc_count >= alloc_fail; diff --git a/reactos/lib/kjs/ksrc/main.c b/reactos/lib/kjs/ksrc/main.c index 3b647ae6228..933d649f5d1 100644 --- a/reactos/lib/kjs/ksrc/main.c +++ b/reactos/lib/kjs/ksrc/main.c @@ -567,7 +567,7 @@ main (int argc, char *argv[]) * Static functions. */ -static inline int +static __inline int is_prefix (char *prefix, char *str) { int i; diff --git a/reactos/lib/kjs/src/alloc.c b/reactos/lib/kjs/src/alloc.c index 5d24b140e24..ef3b275eee0 100644 --- a/reactos/lib/kjs/src/alloc.c +++ b/reactos/lib/kjs/src/alloc.c @@ -96,7 +96,7 @@ unregister_block (MemDebug *b) } -static inline int +static __inline int check_fail () { return alloc_fail != 0 && ++alloc_count >= alloc_fail; diff --git a/reactos/lib/kjs/src/heap.c b/reactos/lib/kjs/src/heap.c index d1f2ab9133f..5ccd5e62ed4 100644 --- a/reactos/lib/kjs/src/heap.c +++ b/reactos/lib/kjs/src/heap.c @@ -54,7 +54,7 @@ * Prototypes for static functions. */ -static inline unsigned int +static __inline unsigned int list (unsigned int size) { unsigned int list = 0; @@ -72,7 +72,7 @@ list (unsigned int size) } -static inline void +static __inline void delete_destroyable (JSHeapMemoryBlock *b) { JSHeapDestroyable *destroyable diff --git a/reactos/lib/kjs/src/main.c b/reactos/lib/kjs/src/main.c index 5e018fa8470..305f17beca1 100644 --- a/reactos/lib/kjs/src/main.c +++ b/reactos/lib/kjs/src/main.c @@ -596,7 +596,7 @@ main (int argc, char *argv[]) * Static functions. */ -static inline int +static __inline int is_prefix (char *prefix, char *str) { int i; diff --git a/reactos/lib/rtl/qsort.c b/reactos/lib/rtl/qsort.c index d3fdc1321fe..cfbbb91b0d2 100644 --- a/reactos/lib/rtl/qsort.c +++ b/reactos/lib/rtl/qsort.c @@ -39,10 +39,6 @@ */ #include -#ifndef __GNUC__ -#define inline -#endif - /* FIXME: these types should be from the default includes */ typedef int (* _pfunccmp_t) (const void *, const void *); @@ -66,7 +62,7 @@ typedef int (* _pfunccmp_t) (const void *, const void *); #define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; -static inline void +static __inline void swapfunc ( char * a, char * b, @@ -90,7 +86,7 @@ swapfunc ( #define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) -static inline char * +static __inline char * med3 ( char * a, char * b, diff --git a/reactos/regtests/shared/regtests.h b/reactos/regtests/shared/regtests.h index 617093d3e16..aae205d1122 100755 --- a/reactos/regtests/shared/regtests.h +++ b/reactos/regtests/shared/regtests.h @@ -76,7 +76,7 @@ FunctionName(int Command) \ #define _Dispatcher(FunctionName, TestName) \ _DispatcherTimeout(FunctionName, TestName, 5000) -static inline void +static __inline void AppendAssertion(char *message) { if (strlen(_Buffer) != 0) @@ -242,7 +242,7 @@ VOID STDCALL _Sleep(DWORD dwMilliseconds); -static inline PCHAR +static __inline PCHAR FrameworkGetExportedFunctionNameInternal(_PAPI_DESCRIPTION ApiDescription) { if (ApiDescription->ForwardedFunctionName != NULL) @@ -255,7 +255,7 @@ FrameworkGetExportedFunctionNameInternal(_PAPI_DESCRIPTION ApiDescription) } } -static inline PVOID +static __inline PVOID FrameworkGetFunction(_PAPI_DESCRIPTION ApiDescription) { HANDLE hModule; @@ -281,7 +281,7 @@ FrameworkGetFunction(_PAPI_DESCRIPTION ApiDescription) return function; } -static inline PVOID +static __inline PVOID FrameworkGetHookInternal(ULONG index) { PVOID address; @@ -316,7 +316,7 @@ FrameworkGetHookInternal(ULONG index) } -static inline VOID +static __inline VOID _SetHook(PCHAR name, PVOID address) { @@ -340,7 +340,7 @@ typedef struct __HOOK PVOID FunctionAddress; } _HOOK, *_PHOOK; -static inline VOID +static __inline VOID _SetHooks(_PHOOK hookTable) { _PHOOK hook; @@ -354,7 +354,7 @@ _SetHooks(_PHOOK hookTable) } } -static inline VOID +static __inline VOID _UnsetHooks(_PHOOK hookTable) { _PHOOK hook; @@ -368,7 +368,7 @@ _UnsetHooks(_PHOOK hookTable) } } -static inline VOID +static __inline VOID _UnsetAllHooks() { _PAPI_DESCRIPTION api; diff --git a/reactos/subsys/win32k/dib/dib16bpp.c b/reactos/subsys/win32k/dib/dib16bpp.c index 59777786d3d..f8dd07078a1 100644 --- a/reactos/subsys/win32k/dib/dib16bpp.c +++ b/reactos/subsys/win32k/dib/dib16bpp.c @@ -396,7 +396,7 @@ return TRUE; typedef unsigned short PIXEL; /* 16-bit HiColor (565 format) */ -inline PIXEL average16(PIXEL a, PIXEL b) +__inline PIXEL average16(PIXEL a, PIXEL b) { // This one doesn't work /* diff --git a/reactos/subsys/win32k/dib/dib32bpp.c b/reactos/subsys/win32k/dib/dib32bpp.c index 8c4f7e2057d..d19bd0f8914 100644 --- a/reactos/subsys/win32k/dib/dib32bpp.c +++ b/reactos/subsys/win32k/dib/dib32bpp.c @@ -352,7 +352,7 @@ typedef unsigned long PIXEL; //NOTE: If you change something here, please do the same in other dibXXbpp.c files! /* 32-bit Color (___ format) */ -inline PIXEL average32(PIXEL a, PIXEL b) +__inline PIXEL average32(PIXEL a, PIXEL b) { return a; // FIXME: Temp hack to remove "PCB-effect" from the image } diff --git a/reactos/subsys/win32k/dib/dib8bpp.c b/reactos/subsys/win32k/dib/dib8bpp.c index 057ca08102e..0a015d57a20 100644 --- a/reactos/subsys/win32k/dib/dib8bpp.c +++ b/reactos/subsys/win32k/dib/dib8bpp.c @@ -276,7 +276,7 @@ DIB_8BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color) typedef unsigned char PIXEL; /* 16-bit HiColor (565 format) */ -inline PIXEL average8(PIXEL a, PIXEL b) +__inline PIXEL average8(PIXEL a, PIXEL b) { return a; // FIXME: Depend on SetStretchMode } diff --git a/reactos/subsys/win32k/eng/clip.c b/reactos/subsys/win32k/eng/clip.c index f61dad5863b..c12a2e9af83 100644 --- a/reactos/subsys/win32k/eng/clip.c +++ b/reactos/subsys/win32k/eng/clip.c @@ -32,7 +32,7 @@ #define NDEBUG #include -static inline int +static __inline int CompareRightDown(const PRECT r1, const PRECT r2) { int Cmp; @@ -66,7 +66,7 @@ CompareRightDown(const PRECT r1, const PRECT r2) return Cmp; } -static inline int +static __inline int CompareRightUp(const PRECT r1, const PRECT r2) { int Cmp; @@ -100,7 +100,7 @@ CompareRightUp(const PRECT r1, const PRECT r2) return Cmp; } -static inline int +static __inline int CompareLeftDown(const PRECT r1, const PRECT r2) { int Cmp; @@ -134,7 +134,7 @@ CompareLeftDown(const PRECT r1, const PRECT r2) return Cmp; } -static inline int +static __inline int CompareLeftUp(const PRECT r1, const PRECT r2) { int Cmp; @@ -168,7 +168,7 @@ CompareLeftUp(const PRECT r1, const PRECT r2) return Cmp; } -static inline int +static __inline int CompareSpans(const PSPAN Span1, const PSPAN Span2) { int Cmp; diff --git a/reactos/subsys/win32k/eng/xlate.c b/reactos/subsys/win32k/eng/xlate.c index 550970191f4..d32b865d9b1 100644 --- a/reactos/subsys/win32k/eng/xlate.c +++ b/reactos/subsys/win32k/eng/xlate.c @@ -32,7 +32,7 @@ #define NDEBUG #include -static inline ULONG +static __inline ULONG ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color) { ULONG TranslatedColor; @@ -54,7 +54,7 @@ ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color) } -static inline ULONG +static __inline ULONG ClosestColorMatch(XLATEGDI *XlateGDI, LPPALETTEENTRY SourceColor, PALETTEENTRY *DestColors, ULONG NumColors) { @@ -94,7 +94,7 @@ ClosestColorMatch(XLATEGDI *XlateGDI, LPPALETTEENTRY SourceColor, return BestIndex; } -static inline VOID +static __inline VOID BitMasksFromPal(USHORT PalType, PPALGDI Palette, PULONG RedMask, PULONG BlueMask, PULONG GreenMask) { @@ -131,7 +131,7 @@ BitMasksFromPal(USHORT PalType, PPALGDI Palette, * Calculate the number of bits Mask must be shift to the left to get a * 1 in the most significant bit position */ -static inline INT +static __inline INT CalculateShift(ULONG Mask) { ULONG Shift = 0; diff --git a/reactos/subsys/win32k/include/class.h b/reactos/subsys/win32k/include/class.h index e80054e952d..f480ec5345a 100644 --- a/reactos/subsys/win32k/include/class.h +++ b/reactos/subsys/win32k/include/class.h @@ -35,10 +35,10 @@ CleanupClassImpl(VOID); void FASTCALL DestroyProcessClasses(PW32PROCESS Process ); -inline VOID FASTCALL +__inline VOID FASTCALL ClassDerefObject(PWNDCLASS_OBJECT Class); -inline VOID FASTCALL +__inline VOID FASTCALL ClassRefObject(PWNDCLASS_OBJECT Class); PWNDCLASS_OBJECT FASTCALL diff --git a/reactos/subsys/win32k/include/msgqueue.h b/reactos/subsys/win32k/include/msgqueue.h index 7d20b9ae1bf..3643328efd2 100644 --- a/reactos/subsys/win32k/include/msgqueue.h +++ b/reactos/subsys/win32k/include/msgqueue.h @@ -198,9 +198,9 @@ MsqIsDblClk(LPMSG Msg, BOOL Remove); HWND FASTCALL MsqSetStateWindow(PUSER_MESSAGE_QUEUE MessageQueue, ULONG Type, HWND hWnd); -inline BOOL MsqIsSignaled( PUSER_MESSAGE_QUEUE queue ); -inline VOID MsqSetQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits ); -inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits ); +__inline BOOL MsqIsSignaled( PUSER_MESSAGE_QUEUE queue ); +__inline VOID MsqSetQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits ); +__inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits ); BOOL STDCALL IntInitMessagePumpHook(); BOOL STDCALL IntUninitMessagePumpHook(); #define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF)) diff --git a/reactos/subsys/win32k/ntuser/class.c b/reactos/subsys/win32k/ntuser/class.c index d9a30f2e559..2ed50a6eb28 100644 --- a/reactos/subsys/win32k/ntuser/class.c +++ b/reactos/subsys/win32k/ntuser/class.c @@ -48,7 +48,7 @@ CleanupClassImpl(VOID) } -inline VOID FASTCALL +__inline VOID FASTCALL ClassDerefObject(PWNDCLASS_OBJECT Class) { ASSERT(Class->refs >= 1); @@ -56,7 +56,7 @@ ClassDerefObject(PWNDCLASS_OBJECT Class) } -inline VOID FASTCALL +__inline VOID FASTCALL ClassRefObject(PWNDCLASS_OBJECT Class) { ASSERT(Class->refs >= 0); diff --git a/reactos/subsys/win32k/ntuser/object.c b/reactos/subsys/win32k/ntuser/object.c index 813075674a7..c95e95abd6e 100644 --- a/reactos/subsys/win32k/ntuser/object.c +++ b/reactos/subsys/win32k/ntuser/object.c @@ -45,13 +45,13 @@ PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle ) return NULL; } -inline static HANDLE entry_to_handle(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ptr ) +__inline static HANDLE entry_to_handle(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ptr ) { int index = ptr - ht->handles; return (HANDLE)(((index << 1) + FIRST_USER_HANDLE) + (ptr->generation << 16)); } -inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) +__inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht) { PUSER_HANDLE_ENTRY entry; @@ -104,7 +104,7 @@ VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes) ht->allocated_handles = bytes / sizeof(USER_HANDLE_ENTRY); } -inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry) +__inline static void *free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry) { void *ret; ret = entry->ptr; diff --git a/reactos/subsys/win32k/objects/bitmaps.c b/reactos/subsys/win32k/objects/bitmaps.c index b2e4c62db43..d2271b3ea54 100644 --- a/reactos/subsys/win32k/objects/bitmaps.c +++ b/reactos/subsys/win32k/objects/bitmaps.c @@ -740,7 +740,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos) * to GDI32. I dunno. Write a test and let me know. */ -static inline BYTE +static __inline BYTE SwapROP3_SrcDst(BYTE bRop3) { return (bRop3 & 0x99) | ((bRop3 & 0x22) << 1) | ((bRop3 & 0x44) >> 1); diff --git a/reactos/subsys/win32k/objects/gdiobj.c b/reactos/subsys/win32k/objects/gdiobj.c index 35280cf8fee..5525c87a6c4 100644 --- a/reactos/subsys/win32k/objects/gdiobj.c +++ b/reactos/subsys/win32k/objects/gdiobj.c @@ -156,7 +156,7 @@ GDIOBJ_iAllocHandleTable(VOID) return handleTable; } -static inline PPAGED_LOOKASIDE_LIST +static __inline PPAGED_LOOKASIDE_LIST FindLookasideList(DWORD ObjectType) { int Index; @@ -174,7 +174,7 @@ FindLookasideList(DWORD ObjectType) return NULL; } -static inline BOOL +static __inline BOOL RunCleanupCallback(PGDIOBJ pObj, DWORD ObjectType) { int Index; @@ -191,7 +191,7 @@ RunCleanupCallback(PGDIOBJ pObj, DWORD ObjectType) return TRUE; } -static inline ULONG +static __inline ULONG GetObjectSize(DWORD ObjectType) { int Index; diff --git a/reactos/subsys/win32k/objects/region.c b/reactos/subsys/win32k/objects/region.c index 157cf54f0a3..ac8511627e1 100644 --- a/reactos/subsys/win32k/objects/region.c +++ b/reactos/subsys/win32k/objects/region.c @@ -402,7 +402,7 @@ typedef struct _ScanLineListBlock { /* * Check to see if there is enough memory in the present region. */ -static inline int xmemcheck(ROSRGNDATA *reg, PRECT *rect, PRECT *firstrect ) { +static __inline int xmemcheck(ROSRGNDATA *reg, PRECT *rect, PRECT *firstrect ) { if ( (reg->rdh.nCount+1)*sizeof( RECT ) >= reg->rdh.nRgnSize ) { PRECT temp; temp = ExAllocatePoolWithTag( PagedPool, (2 * (reg->rdh.nRgnSize)), TAG_REGION); diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index f9587957027..0a9bee84ffb 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -2858,7 +2858,7 @@ GetFontScore(LOGFONTW *LogFont, PUNICODE_STRING FaceName, PFONTGDI FontGDI) return Score; } -static inline VOID +static __inline VOID FindBestFontFromList(FONTOBJ **FontObj, UINT *MatchScore, LOGFONTW *LogFont, PUNICODE_STRING FaceName, PLIST_ENTRY Head) { @@ -2885,7 +2885,7 @@ FindBestFontFromList(FONTOBJ **FontObj, UINT *MatchScore, LOGFONTW *LogFont, } } -static inline BOOLEAN +static __inline BOOLEAN SubstituteFontFamilyKey(PUNICODE_STRING FaceName, LPCWSTR Key) { @@ -2921,7 +2921,7 @@ SubstituteFontFamilyKey(PUNICODE_STRING FaceName, return NT_SUCCESS(Status); } -static inline void +static __inline void SubstituteFontFamily(PUNICODE_STRING FaceName, UINT Level) { if (10 < Level) /* Enough is enough */