forked from akopytov/sysbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Windows support which was broken in 1.0.
- Loading branch information
Showing
28 changed files
with
18 additions
and
921 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright (C) 2016 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2016-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -19,8 +19,7 @@ | |
/* | ||
Thread barrier implementation. It differs from pthread_barrier_t in two ways: | ||
- it's more portable (will also work on OS X and Windows with existing | ||
pthread_* wrappers in sb_win.c). | ||
- it's more portable (will also work on OS X). | ||
- it allows defining a callback function which is called right before | ||
signaling the participating threads to continue, i.e. as soon as the | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright (C) 2016 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2016-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -29,10 +29,6 @@ | |
# include <pthread.h> | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
#include "sb_win.h" | ||
#endif | ||
|
||
#define SB_BARRIER_SERIAL_THREAD 1 | ||
|
||
typedef int (*sb_barrier_cb_t)(void *); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* Copyright (C) 2004 MySQL AB | ||
Copyright (C) 2004-2017 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2004-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -19,9 +19,6 @@ | |
#ifdef HAVE_CONFIG_H | ||
# include "config.h" | ||
#endif | ||
#ifdef _WIN32 | ||
#include "sb_win.h" | ||
#endif | ||
|
||
#ifdef STDC_HEADERS | ||
# include <stdio.h> | ||
|
@@ -372,16 +369,6 @@ void log_errno(log_msg_priority_t priority, const char *fmt, ...) | |
int old_errno; | ||
char *tmp; | ||
|
||
#ifdef _WIN32 | ||
LPVOID lpMsgBuf; | ||
old_errno = GetLastError(); | ||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | | ||
FORMAT_MESSAGE_ALLOCATE_BUFFER | | ||
FORMAT_MESSAGE_IGNORE_INSERTS, | ||
NULL, old_errno, | ||
0, (LPTSTR)&lpMsgBuf, 0, NULL); | ||
tmp = (char *)lpMsgBuf; | ||
#else | ||
old_errno = errno; | ||
#ifdef HAVE_STRERROR_R | ||
#ifdef STRERROR_R_CHAR_P | ||
|
@@ -394,8 +381,7 @@ void log_errno(log_msg_priority_t priority, const char *fmt, ...) | |
strncpy(errbuf, strerror(old_errno), sizeof(errbuf)); | ||
tmp = errbuf; | ||
#endif /* HAVE_STRERROR_P */ | ||
#endif /* WIN32 */ | ||
|
||
|
||
va_start(ap, fmt); | ||
n = vsnprintf(buf, TEXT_BUFFER_SIZE, fmt, ap); | ||
va_end(ap); | ||
|
@@ -404,10 +390,6 @@ void log_errno(log_msg_priority_t priority, const char *fmt, ...) | |
snprintf(buf + n, TEXT_BUFFER_SIZE - n, " errno = %d (%s)", old_errno, | ||
tmp); | ||
|
||
#ifdef _WIN32 | ||
LocalFree(lpMsgBuf); | ||
#endif | ||
|
||
log_text(priority, "%s", buf); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright (C) 2016 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2016-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -25,10 +25,6 @@ | |
# include "config.h" | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
#include "sb_win.h" | ||
#endif | ||
|
||
#ifdef HAVE_PTHREAD_H | ||
# include <pthread.h> | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright (C) 2016 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2016-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -28,10 +28,6 @@ | |
# include "config.h" | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
#include "sb_win.h" | ||
#endif | ||
|
||
#ifdef HAVE_PTHREAD_H | ||
# include <pthread.h> | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* Copyright (C) 2004 MySQL AB | ||
Copyright (C) 2004-2017 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2004-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -23,10 +23,6 @@ | |
# include "config.h" | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
#include "sb_win.h" | ||
#endif | ||
|
||
#ifdef TIME_WITH_SYS_TIME | ||
# include <sys/time.h> | ||
# include <time.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright (C) 2017 Alexey Kopytov <[email protected]> | ||
Copyright (C) 2017-2018 Alexey Kopytov <[email protected]> | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -20,10 +20,6 @@ | |
# include "config.h" | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
#include "sb_win.h" | ||
#endif | ||
|
||
#ifdef STDC_HEADERS | ||
# include <stdlib.h> | ||
# include <inttypes.h> | ||
|
@@ -55,10 +51,6 @@ void *sb_memalign(size_t size, size_t alignment) | |
/* Allocate on page boundary */ | ||
(void) alignment; /* unused */ | ||
buffer = valloc(size); | ||
#elif defined (_WIN32) | ||
/* Allocate on page boundary */ | ||
(void) alignment; /* unused */ | ||
buffer = VirtualAlloc(NULL, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); | ||
#else | ||
# error Cannot find an aligned allocation library function! | ||
#endif | ||
|
@@ -72,10 +64,6 @@ size_t sb_getpagesize(void) | |
{ | ||
#ifdef _SC_PAGESIZE | ||
return sysconf(_SC_PAGESIZE); | ||
#elif defined _WIN32 | ||
SYSTEM_INFO info; | ||
GetSystemInfo(&info); | ||
return info.dwPageSize; | ||
#else | ||
return getpagesize(); | ||
#endif | ||
|
Oops, something went wrong.