summaryrefslogtreecommitdiff
path: root/include/waiting_threads.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mysql.com>2008-10-21 20:10:49 +0200
committerSergei Golubchik <serg@mysql.com>2008-10-21 20:10:49 +0200
commita58d20053dbd9192905bb4525f089a32f16b88f5 (patch)
treea66fe1250952b215446ba4d41adb700fc3880f95 /include/waiting_threads.h
parentf8fc47f062c0b30ecf491cd1e4e9eeba84565044 (diff)
downloadmariadb-git-a58d20053dbd9192905bb4525f089a32f16b88f5.tar.gz
win32: compilation failures, maria.test failure
include/my_global.h: enable compile_time_assert for all compilers include/waiting_threads.h: 1. don't #extern "C" system includes, they don't like it. 2. remove any padding from WT_RESOURCE_ID structure - we want to compare it with memcmp mysys/waiting_threads.c: assert that WT_RESOURCE_ID can be compared with memcmp and has no random padding bytes
Diffstat (limited to 'include/waiting_threads.h')
-rw-r--r--include/waiting_threads.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/waiting_threads.h b/include/waiting_threads.h
index 0df17a47c61..322b5972ec0 100644
--- a/include/waiting_threads.h
+++ b/include/waiting_threads.h
@@ -19,10 +19,10 @@
#include <my_global.h>
#include <my_sys.h>
-C_MODE_START
-
#include <lf.h>
+C_MODE_START
+
typedef struct st_wt_resource_id WT_RESOURCE_ID;
typedef struct st_wt_resource_type {
@@ -30,10 +30,13 @@ typedef struct st_wt_resource_type {
const void *(*make_key)(WT_RESOURCE_ID *id, uint *len);
} WT_RESOURCE_TYPE;
+/* we want to compare this struct with memcmp, make it packed */
+#pragma pack(push,1)
struct st_wt_resource_id {
- WT_RESOURCE_TYPE *type;
ulonglong value;
+ WT_RESOURCE_TYPE *type;
};
+#pragma pack(pop)
#define WT_WAIT_STATS 24
#define WT_CYCLE_STATS 32