mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-01-11 18:33:16 +01:00
Improve support for platforms without stddef.h. NULL definition should now be provided by architecture port file atomport.h, which in most cases can just include stddef.h.
This commit is contained in:
committed by
Himanshu Chauhan
parent
a87d40688b
commit
8bb70d8a90
@@ -143,12 +143,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <atom-types.h>
|
|
||||||
#include <printk.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,12 @@
|
|||||||
/* Required number of system ticks per second (normally 100 for 10ms tick) */
|
/* Required number of system ticks per second (normally 100 for 10ms tick) */
|
||||||
#define SYSTEM_TICKS_PER_SEC 100
|
#define SYSTEM_TICKS_PER_SEC 100
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definition of NULL.
|
||||||
|
* If stddef.h is available on the platform it is simplest to include it
|
||||||
|
* from this header, otherwise define below.
|
||||||
|
*/
|
||||||
|
#define NULL ((void *)(0))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Architecture-specific types.
|
* Architecture-specific types.
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
/* Portable uint8_t and friends available from stdint.h on this platform */
|
/* Portable uint8_t and friends available from stdint.h on this platform */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/* Definition of NULL is available from stddef.h on this platform */
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
/* Required number of system ticks per second (normally 100 for 10ms tick) */
|
/* Required number of system ticks per second (normally 100 for 10ms tick) */
|
||||||
#define SYSTEM_TICKS_PER_SEC 100
|
#define SYSTEM_TICKS_PER_SEC 100
|
||||||
|
|||||||
@@ -39,6 +39,8 @@
|
|||||||
#include <intrins.h>
|
#include <intrins.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Definition of NULL is available from stddef.h on this platform */
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
/* Required number of system ticks per second (normally 100 for 10ms tick) */
|
/* Required number of system ticks per second (normally 100 for 10ms tick) */
|
||||||
#define SYSTEM_TICKS_PER_SEC 100
|
#define SYSTEM_TICKS_PER_SEC 100
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
#include "stm8s.h"
|
#include "stm8s.h"
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomtests.h"
|
#include "atomtests.h"
|
||||||
|
|||||||
@@ -27,13 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atommutex.h"
|
#include "atommutex.h"
|
||||||
#include "atomtests.h"
|
#include "atomtests.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atommutex.h"
|
#include "atommutex.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomtests.h"
|
#include "atomtests.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomqueue.h"
|
#include "atomqueue.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomqueue.h"
|
#include "atomqueue.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomsem.h"
|
#include "atomsem.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomsem.h"
|
#include "atomsem.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomsem.h"
|
#include "atomsem.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomsem.h"
|
#include "atomsem.h"
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STAND_ALONE
|
|
||||||
#include <stddef.h>
|
|
||||||
#else
|
|
||||||
#include <printk.h>
|
|
||||||
#include <atom-types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atomsem.h"
|
#include "atomsem.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user