Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openmrn_features.h File Reference

Go to the source code of this file.

Macros

#define ESP_IDF_VERSION   0
 
#define ESP_IDF_VERSION_VAL(a, b, c)   1
 
#define OPENMRN_HAVE_SOCKET_FSTAT   1
 Enables the code using ::fstat to confirm if the file handle is a socket.
 
#define OPENMRN_HAVE_PSELECT   1
 Uses ::pselect in the Executor for sleep and pkill for waking up.
 
#define OPENMRN_FEATURE_EXECUTOR_SELECT   1
 
#define OPENMRN_FEATURE_MUTEX_PTHREAD   1
 Use pthread_mutex for os_mutex implementation.
 
#define OPENMRN_FEATURE_THREAD_PTHREAD   1
 Use pthread for os_thread_create.
 
#define OPENMRN_HAVE_PTHREAD_SETNAME   1
 Use pthread_setname for setting the newly created thread's name.
 
#define OPENMRN_FEATURE_PTHREAD_SETSTACK   1
 Use pthread_attr for setting the stack size of newly created threads.
 
#define OPENMRN_FEATURE_REBOOT   1
 Compiles support for calling reboot() in ConfigUpdateFlow.hxx and MemoryConfig.cxx.
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file defines compilation-time configuration options for OpenMRN, which are exclusively in the form of C-compatible macros. These control conditional compilation on different operating systems.

Author
Balazs Racz
Date
24 February 2019

Definition in file openmrn_features.h.

Macro Definition Documentation

◆ ESP_IDF_VERSION

#define ESP_IDF_VERSION   0

Definition at line 43 of file openmrn_features.h.

◆ ESP_IDF_VERSION_VAL

#define ESP_IDF_VERSION_VAL (   a,
  b,
 
)    1

Definition at line 44 of file openmrn_features.h.

◆ OPENMRN_FEATURE_EXECUTOR_SELECT

#define OPENMRN_FEATURE_EXECUTOR_SELECT   1

Definition at line 91 of file openmrn_features.h.

◆ OPENMRN_FEATURE_MUTEX_PTHREAD

#define OPENMRN_FEATURE_MUTEX_PTHREAD   1

Use pthread_mutex for os_mutex implementation.

Definition at line 112 of file openmrn_features.h.

◆ OPENMRN_FEATURE_PTHREAD_SETSTACK

#define OPENMRN_FEATURE_PTHREAD_SETSTACK   1

Use pthread_attr for setting the stack size of newly created threads.

Linux/Unix allocates stack as needed.

Definition at line 136 of file openmrn_features.h.

◆ OPENMRN_FEATURE_REBOOT

#define OPENMRN_FEATURE_REBOOT   1

Compiles support for calling reboot() in ConfigUpdateFlow.hxx and MemoryConfig.cxx.

Definition at line 177 of file openmrn_features.h.

◆ OPENMRN_FEATURE_THREAD_PTHREAD

#define OPENMRN_FEATURE_THREAD_PTHREAD   1

Use pthread for os_thread_create.

Definition at line 128 of file openmrn_features.h.

◆ OPENMRN_HAVE_PSELECT

#define OPENMRN_HAVE_PSELECT   1

Uses ::pselect in the Executor for sleep and pkill for waking up.

Todo:
this should probably be a whitelist: linux || MACH.

Definition at line 81 of file openmrn_features.h.

◆ OPENMRN_HAVE_PTHREAD_SETNAME

#define OPENMRN_HAVE_PTHREAD_SETNAME   1

Use pthread_setname for setting the newly created thread's name.

Definition at line 131 of file openmrn_features.h.

◆ OPENMRN_HAVE_SOCKET_FSTAT

#define OPENMRN_HAVE_SOCKET_FSTAT   1

Enables the code using ::fstat to confirm if the file handle is a socket.

Definition at line 74 of file openmrn_features.h.