mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-01-11 18:33:16 +01:00
Add extern "C" modifiers to main public header files for mixing C/C++. Minor modifications to pull request from @bacek.
This commit is contained in:
@@ -30,6 +30,10 @@
|
||||
#ifndef __ATOM_H
|
||||
#define __ATOM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "atomtimer.h"
|
||||
#include "atomport.h"
|
||||
|
||||
@@ -122,5 +126,8 @@ extern void archFirstThreadRestore(ATOM_TCB *new_tcb_ptr);
|
||||
|
||||
extern void atomTimerTick (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ATOM_H */
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#ifndef __ATOM_MUTEX_H
|
||||
#define __ATOM_MUTEX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct atom_mutex
|
||||
{
|
||||
ATOM_TCB * suspQ; /* Queue of threads suspended on this mutex */
|
||||
@@ -41,4 +45,8 @@ extern uint8_t atomMutexDelete (ATOM_MUTEX *mutex);
|
||||
extern uint8_t atomMutexGet (ATOM_MUTEX *mutex, int32_t timeout);
|
||||
extern uint8_t atomMutexPut (ATOM_MUTEX *mutex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ATOM_MUTEX_H */
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#ifndef __ATOM_QUEUE_H
|
||||
#define __ATOM_QUEUE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct atom_queue
|
||||
{
|
||||
ATOM_TCB * putSuspQ; /* Queue of threads waiting to send */
|
||||
@@ -46,4 +50,8 @@ extern uint8_t atomQueueDelete (ATOM_QUEUE *qptr);
|
||||
extern uint8_t atomQueueGet (ATOM_QUEUE *qptr, int32_t timeout, uint8_t *msgptr);
|
||||
extern uint8_t atomQueuePut (ATOM_QUEUE *qptr, int32_t timeout, uint8_t *msgptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ATOM_QUEUE_H */
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#ifndef __ATOM_SEM_H
|
||||
#define __ATOM_SEM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct atom_sem
|
||||
{
|
||||
ATOM_TCB * suspQ; /* Queue of threads suspended on this semaphore */
|
||||
@@ -42,4 +46,8 @@ extern uint8_t atomSemGet (ATOM_SEM *sem, int32_t timeout);
|
||||
extern uint8_t atomSemPut (ATOM_SEM *sem);
|
||||
extern uint8_t atomSemResetCount (ATOM_SEM *sem, uint8_t count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ATOM_SEM_H */
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#ifndef __ATOM_TIMER_H
|
||||
#define __ATOM_TIMER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "atomport.h"
|
||||
|
||||
|
||||
@@ -58,4 +62,8 @@ extern uint8_t atomTimerDelay (uint32_t ticks);
|
||||
extern uint32_t atomTimeGet (void);
|
||||
extern void atomTimeSet (uint32_t new_time);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ATOM_TIMER_H */
|
||||
|
||||
Reference in New Issue
Block a user