mmap portability changes by Spry

This commit is contained in:
Charles Kerr 2008-10-14 17:30:07 +00:00
parent e8b4465a00
commit e4b1d5d726
1 changed files with 5 additions and 1 deletions

View File

@ -637,7 +637,11 @@ tr_lockfile( const char * filename )
* his paper at: http://www.genesys-e.de/jwalter/mix4win.htm
*/
#if defined(_MSC_VER)
__declspec( align( 4 ) ) static LONG volatile g_sl;
#else
static LONG volatile g_sl __attribute__ ( ( aligned ( 4 ) ) );
#endif
/* Wait for spin lock */
static int
@ -651,7 +655,7 @@ slwait( LONG volatile *sl )
/* Release spin lock */
static int
slrelease( LONG *sl )
slrelease( LONG volatile *sl )
{
InterlockedExchange ( sl, 0 );
return 0;