Permalink
Browse files

Add extern "C" modifiers to main public header files for mixing C/C++…

…. Minor modifications to pull request from @bacek.
  • Loading branch information...
kelvinlawson committed Jul 13, 2012
1 parent 43df308 commit 34e989424f220ee017e497a07eeb7bf033ab3184
Showing with 39 additions and 0 deletions.
  1. +7 −0 kernel/atom.h
  2. +8 −0 kernel/atommutex.h
  3. +8 −0 kernel/atomqueue.h
  4. +8 −0 kernel/atomsem.h
  5. +8 −0 kernel/atomtimer.h
View
@@ -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 */
View
@@ -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 */
View
@@ -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 */
View
@@ -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 */
View
@@ -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 */

0 comments on commit 34e9894

Please sign in to comment.