mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 18:15:40 +01:00
Whitespace fixes
This commit is contained in:
parent
388dac4037
commit
487588d0bf
@ -55,7 +55,7 @@ struct _hr_time
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(POLARSSL_HAVE_HARDCLOCK) && defined(POLARSSL_HAVE_ASM) && \
|
#if !defined(POLARSSL_HAVE_HARDCLOCK) && defined(POLARSSL_HAVE_ASM) && \
|
||||||
(defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)
|
(defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)
|
||||||
|
|
||||||
#define POLARSSL_HAVE_HARDCLOCK
|
#define POLARSSL_HAVE_HARDCLOCK
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ unsigned long hardclock( void )
|
|||||||
unsigned long hardclock( void )
|
unsigned long hardclock( void )
|
||||||
{
|
{
|
||||||
unsigned long lo, hi;
|
unsigned long lo, hi;
|
||||||
asm( "rdtsc" : "=a" (lo), "=d" (hi) );
|
asm( "rdtsc" : "=a" (lo), "=d" (hi) );
|
||||||
return( lo | (hi << 32) );
|
return( lo | (hi << 32) );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -181,9 +181,9 @@ unsigned long hardclock( void )
|
|||||||
{
|
{
|
||||||
LARGE_INTEGER offset;
|
LARGE_INTEGER offset;
|
||||||
|
|
||||||
QueryPerformanceCounter( &offset );
|
QueryPerformanceCounter( &offset );
|
||||||
|
|
||||||
return (unsigned long)( offset.QuadPart );
|
return (unsigned long)( offset.QuadPart );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -234,17 +234,17 @@ unsigned long get_timer( struct hr_time *val, int reset )
|
|||||||
}
|
}
|
||||||
|
|
||||||
DWORD WINAPI TimerProc( LPVOID uElapse )
|
DWORD WINAPI TimerProc( LPVOID uElapse )
|
||||||
{
|
{
|
||||||
Sleep( (DWORD) uElapse );
|
Sleep( (DWORD) uElapse );
|
||||||
alarmed = 1;
|
alarmed = 1;
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_alarm( int seconds )
|
void set_alarm( int seconds )
|
||||||
{
|
{
|
||||||
DWORD ThreadId;
|
DWORD ThreadId;
|
||||||
|
|
||||||
alarmed = 0;
|
alarmed = 0;
|
||||||
CloseHandle( CreateThread( NULL, 0, TimerProc,
|
CloseHandle( CreateThread( NULL, 0, TimerProc,
|
||||||
(LPVOID) ( seconds * 1000 ), 0, &ThreadId ) );
|
(LPVOID) ( seconds * 1000 ), 0, &ThreadId ) );
|
||||||
}
|
}
|
||||||
@ -285,7 +285,7 @@ void m_sleep( int milliseconds )
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
static void sighandler( int signum )
|
static void sighandler( int signum )
|
||||||
{
|
{
|
||||||
alarmed = 1;
|
alarmed = 1;
|
||||||
signal( signum, sighandler );
|
signal( signum, sighandler );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user