Prefer "static inline" to avoid duplicate symbols.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a3de4a092d
commit
ae3c8c2085
@ -25,7 +25,7 @@ typedef struct
|
|||||||
|
|
||||||
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
||||||
|
|
||||||
inline void coroutine_initialize(
|
static inline void coroutine_initialize(
|
||||||
coroutine_context *context,
|
coroutine_context *context,
|
||||||
coroutine_start start,
|
coroutine_start start,
|
||||||
void *stack_pointer,
|
void *stack_pointer,
|
||||||
@ -49,7 +49,7 @@ inline void coroutine_initialize(
|
|||||||
|
|
||||||
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
||||||
|
|
||||||
inline void coroutine_destroy(coroutine_context * context)
|
static inline void coroutine_destroy(coroutine_context * context)
|
||||||
{
|
{
|
||||||
context->stack_pointer = NULL;
|
context->stack_pointer = NULL;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ typedef struct
|
|||||||
|
|
||||||
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
||||||
|
|
||||||
inline void coroutine_initialize(
|
static inline void coroutine_initialize(
|
||||||
coroutine_context *context,
|
coroutine_context *context,
|
||||||
coroutine_start start,
|
coroutine_start start,
|
||||||
void *stack_pointer,
|
void *stack_pointer,
|
||||||
@ -47,7 +47,7 @@ inline void coroutine_initialize(
|
|||||||
|
|
||||||
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
||||||
|
|
||||||
inline void coroutine_destroy(coroutine_context * context)
|
static inline void coroutine_destroy(coroutine_context * context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ typedef struct
|
|||||||
|
|
||||||
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
||||||
|
|
||||||
inline void coroutine_initialize(
|
static inline void coroutine_initialize(
|
||||||
coroutine_context *context,
|
coroutine_context *context,
|
||||||
coroutine_start start,
|
coroutine_start start,
|
||||||
void *stack_pointer,
|
void *stack_pointer,
|
||||||
@ -48,7 +48,7 @@ inline void coroutine_initialize(
|
|||||||
|
|
||||||
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
||||||
|
|
||||||
inline void coroutine_destroy(coroutine_context * context)
|
static inline void coroutine_destroy(coroutine_context * context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ struct coroutine_context
|
|||||||
|
|
||||||
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
||||||
|
|
||||||
inline void coroutine_initialize(
|
static inline void coroutine_initialize(
|
||||||
coroutine_context *context,
|
coroutine_context *context,
|
||||||
coroutine_start start,
|
coroutine_start start,
|
||||||
void *stack_pointer,
|
void *stack_pointer,
|
||||||
@ -52,7 +52,7 @@ inline void coroutine_initialize(
|
|||||||
|
|
||||||
coroutine_context * __fastcall coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
coroutine_context * __fastcall coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
||||||
|
|
||||||
inline void coroutine_destroy(coroutine_context * context)
|
static inline void coroutine_destroy(coroutine_context * context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ struct coroutine_context
|
|||||||
|
|
||||||
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self);
|
||||||
|
|
||||||
inline void coroutine_initialize(
|
static inline void coroutine_initialize(
|
||||||
coroutine_context *context,
|
coroutine_context *context,
|
||||||
coroutine_start start,
|
coroutine_start start,
|
||||||
void *stack_pointer,
|
void *stack_pointer,
|
||||||
@ -52,7 +52,7 @@ inline void coroutine_initialize(
|
|||||||
|
|
||||||
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target);
|
||||||
|
|
||||||
inline void coroutine_destroy(coroutine_context * context)
|
static inline void coroutine_destroy(coroutine_context * context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,11 +25,11 @@ typedef struct
|
|||||||
|
|
||||||
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self) __attribute__((fastcall));
|
typedef COROUTINE(* coroutine_start)(coroutine_context *from, coroutine_context *self) __attribute__((fastcall));
|
||||||
|
|
||||||
void coroutine_initialize(
|
static inline void coroutine_initialize(
|
||||||
coroutine_context *context,
|
coroutine_context *context,
|
||||||
coroutine_start start,
|
coroutine_start start,
|
||||||
void *stack_pointer,
|
void *stack_pointer,
|
||||||
size_t stack_size
|
size_t stack_size
|
||||||
) {
|
) {
|
||||||
/* Force 16-byte alignment */
|
/* Force 16-byte alignment */
|
||||||
context->stack_pointer = (void**)((uintptr_t)stack_pointer & ~0xF);
|
context->stack_pointer = (void**)((uintptr_t)stack_pointer & ~0xF);
|
||||||
@ -49,7 +49,7 @@ void coroutine_initialize(
|
|||||||
|
|
||||||
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target) __attribute__((fastcall));
|
coroutine_context * coroutine_transfer(coroutine_context * current, coroutine_context * target) __attribute__((fastcall));
|
||||||
|
|
||||||
inline void coroutine_destroy(coroutine_context * context)
|
static inline void coroutine_destroy(coroutine_context * context)
|
||||||
{
|
{
|
||||||
context->stack_pointer = NULL;
|
context->stack_pointer = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user