Commit 01086677 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

ntdll: Replace inline static with static inline.

parent 503b338e
...@@ -37,17 +37,17 @@ ...@@ -37,17 +37,17 @@
WINE_DEFAULT_DEBUG_CHANNEL(ntdll); WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
WINE_DECLARE_DEBUG_CHANNEL(relay); WINE_DECLARE_DEBUG_CHANNEL(relay);
inline static LONG interlocked_inc( PLONG dest ) static inline LONG interlocked_inc( PLONG dest )
{ {
return interlocked_xchg_add( (int *)dest, 1 ) + 1; return interlocked_xchg_add( (int *)dest, 1 ) + 1;
} }
inline static LONG interlocked_dec( PLONG dest ) static inline LONG interlocked_dec( PLONG dest )
{ {
return interlocked_xchg_add( (int *)dest, -1 ) - 1; return interlocked_xchg_add( (int *)dest, -1 ) - 1;
} }
inline static void small_pause(void) static inline void small_pause(void)
{ {
#ifdef __i386__ #ifdef __i386__
__asm__ __volatile__( "rep;nop" : : : "memory" ); __asm__ __volatile__( "rep;nop" : : : "memory" );
......
...@@ -111,19 +111,19 @@ static FARPROC find_named_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY * ...@@ -111,19 +111,19 @@ static FARPROC find_named_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *
DWORD exp_size, const char *name, int hint ); DWORD exp_size, const char *name, int hint );
/* convert PE image VirtualAddress to Real Address */ /* convert PE image VirtualAddress to Real Address */
inline static void *get_rva( HMODULE module, DWORD va ) static inline void *get_rva( HMODULE module, DWORD va )
{ {
return (void *)((char *)module + va); return (void *)((char *)module + va);
} }
/* check whether the file name contains a path */ /* check whether the file name contains a path */
inline static int contains_path( LPCWSTR name ) static inline int contains_path( LPCWSTR name )
{ {
return ((*name && (name[1] == ':')) || strchrW(name, '/') || strchrW(name, '\\')); return ((*name && (name[1] == ':')) || strchrW(name, '/') || strchrW(name, '\\'));
} }
/* convert from straight ASCII to Unicode without depending on the current codepage */ /* convert from straight ASCII to Unicode without depending on the current codepage */
inline static void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
{ {
while (len--) *dst++ = (unsigned char)*src++; while (len--) *dst++ = (unsigned char)*src++;
} }
......
...@@ -83,14 +83,14 @@ static const WCHAR **debug_from_snoop_includelist; ...@@ -83,14 +83,14 @@ static const WCHAR **debug_from_snoop_includelist;
static BOOL init_done; static BOOL init_done;
/* compare an ASCII and a Unicode string without depending on the current codepage */ /* compare an ASCII and a Unicode string without depending on the current codepage */
inline static int strcmpAW( const char *strA, const WCHAR *strW ) static inline int strcmpAW( const char *strA, const WCHAR *strW )
{ {
while (*strA && ((unsigned char)*strA == *strW)) { strA++; strW++; } while (*strA && ((unsigned char)*strA == *strW)) { strA++; strW++; }
return (unsigned char)*strA - *strW; return (unsigned char)*strA - *strW;
} }
/* compare an ASCII and a Unicode string without depending on the current codepage */ /* compare an ASCII and a Unicode string without depending on the current codepage */
inline static int strncmpiAW( const char *strA, const WCHAR *strW, int n ) static inline int strncmpiAW( const char *strA, const WCHAR *strW, int n )
{ {
int ret = 0; int ret = 0;
for ( ; n > 0; n--, strA++, strW++) for ( ; n > 0; n--, strA++, strW++)
......
...@@ -56,7 +56,7 @@ static LANGID user_ui_language, system_ui_language; ...@@ -56,7 +56,7 @@ static LANGID user_ui_language, system_ui_language;
* *
* Check if a module handle is for a LOAD_LIBRARY_AS_DATAFILE module. * Check if a module handle is for a LOAD_LIBRARY_AS_DATAFILE module.
*/ */
inline static int is_data_file_module( HMODULE hmod ) static inline int is_data_file_module( HMODULE hmod )
{ {
return (ULONG_PTR)hmod & 1; return (ULONG_PTR)hmod & 1;
} }
......
...@@ -283,7 +283,7 @@ static void read_reply_data( void *buffer, size_t size ) ...@@ -283,7 +283,7 @@ static void read_reply_data( void *buffer, size_t size )
* *
* Wait for a reply from the server. * Wait for a reply from the server.
*/ */
inline static void wait_reply( struct __server_request_info *req ) static inline void wait_reply( struct __server_request_info *req )
{ {
read_reply_data( &req->u.reply, sizeof(req->u.reply) ); read_reply_data( &req->u.reply, sizeof(req->u.reply) );
if (req->u.reply.reply_header.reply_size) if (req->u.reply.reply_header.reply_size)
...@@ -473,7 +473,7 @@ struct fd_cache_entry ...@@ -473,7 +473,7 @@ struct fd_cache_entry
static struct fd_cache_entry *fd_cache[FD_CACHE_ENTRIES]; static struct fd_cache_entry *fd_cache[FD_CACHE_ENTRIES];
static struct fd_cache_entry fd_cache_initial_block[FD_CACHE_BLOCK_SIZE]; static struct fd_cache_entry fd_cache_initial_block[FD_CACHE_BLOCK_SIZE];
inline static unsigned int handle_to_index( obj_handle_t handle, unsigned int *entry ) static inline unsigned int handle_to_index( obj_handle_t handle, unsigned int *entry )
{ {
unsigned long idx = ((unsigned long)handle >> 2) - 1; unsigned long idx = ((unsigned long)handle >> 2) - 1;
*entry = idx / FD_CACHE_BLOCK_SIZE; *entry = idx / FD_CACHE_BLOCK_SIZE;
......
...@@ -352,7 +352,7 @@ enum i386_trap_code ...@@ -352,7 +352,7 @@ enum i386_trap_code
/*********************************************************************** /***********************************************************************
* dispatch_signal * dispatch_signal
*/ */
inline static int dispatch_signal(unsigned int sig) static inline int dispatch_signal(unsigned int sig)
{ {
if (handlers[sig] == NULL) return 0; if (handlers[sig] == NULL) return 0;
return handlers[sig](sig); return handlers[sig](sig);
...@@ -539,7 +539,7 @@ typedef void (WINAPI *raise_func)( EXCEPTION_RECORD *rec, CONTEXT *context ); ...@@ -539,7 +539,7 @@ typedef void (WINAPI *raise_func)( EXCEPTION_RECORD *rec, CONTEXT *context );
* *
* Handler initialization when the full context is not needed. * Handler initialization when the full context is not needed.
*/ */
inline static void *init_handler( const SIGCONTEXT *sigcontext, WORD *fs, WORD *gs ) static inline void *init_handler( const SIGCONTEXT *sigcontext, WORD *fs, WORD *gs )
{ {
void *stack = (void *)(ESP_sig(sigcontext) & ~3); void *stack = (void *)(ESP_sig(sigcontext) & ~3);
TEB *teb = get_current_teb(); TEB *teb = get_current_teb();
...@@ -596,7 +596,7 @@ inline static void *init_handler( const SIGCONTEXT *sigcontext, WORD *fs, WORD * ...@@ -596,7 +596,7 @@ inline static void *init_handler( const SIGCONTEXT *sigcontext, WORD *fs, WORD *
* *
* Save the thread FPU context. * Save the thread FPU context.
*/ */
inline static void save_fpu( CONTEXT *context ) static inline void save_fpu( CONTEXT *context )
{ {
#ifdef __GNUC__ #ifdef __GNUC__
context->ContextFlags |= CONTEXT_FLOATING_POINT; context->ContextFlags |= CONTEXT_FLOATING_POINT;
...@@ -610,7 +610,7 @@ inline static void save_fpu( CONTEXT *context ) ...@@ -610,7 +610,7 @@ inline static void save_fpu( CONTEXT *context )
* *
* Restore the FPU context to a sigcontext. * Restore the FPU context to a sigcontext.
*/ */
inline static void restore_fpu( const CONTEXT *context ) static inline void restore_fpu( const CONTEXT *context )
{ {
FLOATING_SAVE_AREA float_status = context->FloatSave; FLOATING_SAVE_AREA float_status = context->FloatSave;
/* reset the current interrupt status */ /* reset the current interrupt status */
...@@ -626,7 +626,7 @@ inline static void restore_fpu( const CONTEXT *context ) ...@@ -626,7 +626,7 @@ inline static void restore_fpu( const CONTEXT *context )
* *
* Build a context structure from the signal info. * Build a context structure from the signal info.
*/ */
inline static void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext, WORD fs, WORD gs ) static inline void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext, WORD fs, WORD gs )
{ {
struct ntdll_thread_regs * const regs = ntdll_get_thread_regs(); struct ntdll_thread_regs * const regs = ntdll_get_thread_regs();
...@@ -674,7 +674,7 @@ inline static void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext, ...@@ -674,7 +674,7 @@ inline static void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext,
* *
* Restore the signal info from the context. * Restore the signal info from the context.
*/ */
inline static void restore_context( const CONTEXT *context, SIGCONTEXT *sigcontext ) static inline void restore_context( const CONTEXT *context, SIGCONTEXT *sigcontext )
{ {
struct ntdll_thread_regs * const regs = ntdll_get_thread_regs(); struct ntdll_thread_regs * const regs = ntdll_get_thread_regs();
......
...@@ -167,7 +167,7 @@ static wine_signal_handler handlers[256]; ...@@ -167,7 +167,7 @@ static wine_signal_handler handlers[256];
/*********************************************************************** /***********************************************************************
* dispatch_signal * dispatch_signal
*/ */
inline static int dispatch_signal(unsigned int sig) static inline int dispatch_signal(unsigned int sig)
{ {
if (handlers[sig] == NULL) return 0; if (handlers[sig] == NULL) return 0;
return handlers[sig](sig); return handlers[sig](sig);
...@@ -239,7 +239,7 @@ static void restore_context( const CONTEXT *context, SIGCONTEXT *sigcontext ) ...@@ -239,7 +239,7 @@ static void restore_context( const CONTEXT *context, SIGCONTEXT *sigcontext )
* *
* Set the FPU context from a sigcontext. * Set the FPU context from a sigcontext.
*/ */
inline static void save_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext ) static inline void save_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
{ {
#define C(x) context->Fpr##x = FLOAT_sig(x,sigcontext) #define C(x) context->Fpr##x = FLOAT_sig(x,sigcontext)
C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); C(10); C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); C(10);
...@@ -256,7 +256,7 @@ inline static void save_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext ) ...@@ -256,7 +256,7 @@ inline static void save_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
* *
* Restore the FPU context to a sigcontext. * Restore the FPU context to a sigcontext.
*/ */
inline static void restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext ) static inline void restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
{ {
#define C(x) FLOAT_sig(x,sigcontext) = context->Fpr##x #define C(x) FLOAT_sig(x,sigcontext) = context->Fpr##x
C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); C(10); C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); C(10);
......
...@@ -54,7 +54,7 @@ static wine_signal_handler handlers[256]; ...@@ -54,7 +54,7 @@ static wine_signal_handler handlers[256];
/*********************************************************************** /***********************************************************************
* dispatch_signal * dispatch_signal
*/ */
inline static int dispatch_signal(unsigned int sig) static inline int dispatch_signal(unsigned int sig)
{ {
if (handlers[sig] == NULL) return 0; if (handlers[sig] == NULL) return 0;
return handlers[sig](sig); return handlers[sig](sig);
......
...@@ -124,7 +124,7 @@ static wine_signal_handler handlers[256]; ...@@ -124,7 +124,7 @@ static wine_signal_handler handlers[256];
/*********************************************************************** /***********************************************************************
* dispatch_signal * dispatch_signal
*/ */
inline static int dispatch_signal(unsigned int sig) static inline int dispatch_signal(unsigned int sig)
{ {
if (handlers[sig] == NULL) return 0; if (handlers[sig] == NULL) return 0;
return handlers[sig](sig); return handlers[sig](sig);
......
...@@ -61,12 +61,12 @@ struct work_item ...@@ -61,12 +61,12 @@ struct work_item
PVOID context; PVOID context;
}; };
inline static LONG interlocked_inc( PLONG dest ) static inline LONG interlocked_inc( PLONG dest )
{ {
return interlocked_xchg_add( (int *)dest, 1 ) + 1; return interlocked_xchg_add( (int *)dest, 1 ) + 1;
} }
inline static LONG interlocked_dec( PLONG dest ) static inline LONG interlocked_dec( PLONG dest )
{ {
return interlocked_xchg_add( (int *)dest, -1 ) - 1; return interlocked_xchg_add( (int *)dest, -1 ) - 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment