Cleanup header files

- All now include maxscale/cdefs.h as the very first file.
- MXS_[BEGIN|END]_DECLS added to all C-headers.
  Strictly speaking not necessary for private headers, but
  does not hurt either.
- Include guards moved to the very top of the file.
- #pragma once added.
This commit is contained in:
Johan Wikman
2016-10-14 11:51:44 +03:00
parent dc1f599b49
commit 1a978be6b6
86 changed files with 647 additions and 206 deletions

View File

@ -1,5 +1,6 @@
#ifndef _RDTSC_H
#define _RDTSC_H
#pragma once
#ifndef _MAXSCALE_RDTSC_H
#define _MAXSCALE_RDTSC_H
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
@ -31,6 +32,10 @@
* @endverbatim
*/
#include <maxscale/cdefs.h>
MXS_BEGIN_DECLS
typedef unsigned long long CYCLES;
/**
@ -53,4 +58,7 @@ static __inline__ CYCLES rdtsc(void)
__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
return x;
}
MXS_END_DECLS
#endif