Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jens Gustedt
P99 - macros and functions for C99
Commits
2112475b
Commit
2112475b
authored
Apr 28, 2014
by
Jens Gustedt
Browse files
Merge branch 'intel-fix'
parents
0644615f
0981a7e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
p99/p99_atomic_gcc_sync.h
View file @
2112475b
...
...
@@ -45,7 +45,7 @@ p99_extension ({
#define p00_sync_lock_release_(OBJ, ORD, ...) \
p99_extension ({ \
P99_MACRO_PVAR(p00_obj, (OBJ)
);
\
P99_MACRO_PVAR(p00_obj, (OBJ)
, volatile);
\
/* __sync_lock_release only has release consistency */
\
/* the fence must come before so nothing can be reordered after */
\
switch (ORD) { \
...
...
@@ -60,7 +60,7 @@ p99_extension ({ \
#define p00_sync_lock_test_and_set_(OBJ, ORD, ...) \
p99_extension ({ \
P99_MACRO_PVAR(p00_obj, (OBJ)
);
\
P99_MACRO_PVAR(p00_obj, (OBJ)
, volatile);
\
/* __sync_lock_test_and_set only has acquire consistency */
\
int ret = __sync_lock_test_and_set(p00_obj, 1); \
/* the fence must come after so nothing can be reordered before */
\
...
...
p99/p99_compiler.h
View file @
2112475b
...
...
@@ -391,7 +391,7 @@ signed p00_trailing_comma_in_initializer__(void) {
#endif
#if P99_COMPILER & P99_COMPILER_INTEL
# define p99_inline __attribute__((__always_inline__))
inline
# define p99_inline __attribute__((__
weak__,__
always_inline__))
# if __INTEL_COMPILER < 1310
# if defined(__GNUC__) && defined(p00_has_feature_tgmath_h)
# undef p00_has_feature_tgmath_h
...
...
@@ -552,11 +552,6 @@ signed p00_trailing_comma_in_initializer__(void) {
**/
# define P99_WEAK(...) P99_IF_LT(P99_NARG(__VA_ARGS__), 2)(P00_WEAK1(__VA_ARGS__))(P00_WEAK2(__VA_ARGS__))
#if P99_COMPILER_INTEL
# define P99_TENTATIVE_CAUTION 1
#endif
#ifndef P99_TENTATIVE_CAUTION
# define P00_TENTATIVE_DEC(NAME) static
# define P00_TENTATIVE_DEF(NAME) static
...
...
p99/p99_map.h
View file @
2112475b
...
...
@@ -169,7 +169,7 @@ P00_DOCUMENT_PERMITTED_ARGUMENT(P99_JOIN, 2)
P00_DOCUMENT_MULTIPLE_ARGUMENT
(
P99_STRDUP
,
0
)
P00_DOCUMENT_MULTIPLE_ARGUMENT
(
P99_STRDUP
,
1
)
P00_DOCUMENT_MULTIPLE_ARGUMENT
(
P99_STRDUP
,
2
)
#define P99_STRDUP(...) P99_STRCATS(
memset(m
alloc(P99_STRLENS(__VA_ARGS__) + 1
), 0
, 1), __VA_ARGS__)
#define P99_STRDUP(...) P99_STRCATS(
c
alloc(P99_STRLENS(__VA_ARGS__) + 1
6
, 1), __VA_ARGS__)
/**
** @brief Produce a list of length @a N that has the contents of 0,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment