mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Add basic data structures that will allow us to move named semaphore support out of the OS and into the VFS (not complete).
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
/* open flag settings for open() (and related APIs) */
|
/* open flag settings for open() (and related APIs) */
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
/* Common numbers */
|
/* Common numbers */
|
||||||
|
|||||||
+1
-5
@@ -45,11 +45,7 @@
|
|||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Compilations Switches
|
* Pre-processor Definitions
|
||||||
********************************************************************************/
|
|
||||||
|
|
||||||
/********************************************************************************
|
|
||||||
* Definitions
|
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#define MQ_NONBLOCK O_NONBLOCK
|
#define MQ_NONBLOCK O_NONBLOCK
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* All 7-bit ASCII codes */
|
/* All 7-bit ASCII codes */
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* GCC-specific definitions *************************************************/
|
/* GCC-specific definitions *************************************************/
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#ifdef CONFIG_PLATFORM_CONFIGDATA
|
#ifdef CONFIG_PLATFORM_CONFIGDATA
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
/* CONFIG_AUDIO - Enables Audio driver support
|
/* CONFIG_AUDIO - Enables Audio driver support
|
||||||
|
|||||||
+57
-24
@@ -48,8 +48,10 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
|
|
||||||
|
#include <nuttx/semaphore.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Stream flags for the fs_flags field of in struct file_struct */
|
/* Stream flags for the fs_flags field of in struct file_struct */
|
||||||
|
|
||||||
@@ -57,7 +59,7 @@
|
|||||||
#define __FS_FLAG_ERROR (1 << 1) /* Error detected by any operation */
|
#define __FS_FLAG_ERROR (1 << 1) /* Error detected by any operation */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Type Definitions
|
* Public Type Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* This structure is provided by devices when they are registered with the
|
/* This structure is provided by devices when they are registered with the
|
||||||
@@ -66,7 +68,6 @@
|
|||||||
|
|
||||||
struct file;
|
struct file;
|
||||||
struct pollfd;
|
struct pollfd;
|
||||||
|
|
||||||
struct file_operations
|
struct file_operations
|
||||||
{
|
{
|
||||||
/* The device driver open method differs from the mountpoint open method */
|
/* The device driver open method differs from the mountpoint open method */
|
||||||
@@ -114,9 +115,9 @@ struct block_operations
|
|||||||
int (*open)(FAR struct inode *inode);
|
int (*open)(FAR struct inode *inode);
|
||||||
int (*close)(FAR struct inode *inode);
|
int (*close)(FAR struct inode *inode);
|
||||||
ssize_t (*read)(FAR struct inode *inode, FAR unsigned char *buffer,
|
ssize_t (*read)(FAR struct inode *inode, FAR unsigned char *buffer,
|
||||||
size_t start_sector, unsigned int nsectors);
|
size_t start_sector, unsigned int nsectors);
|
||||||
ssize_t (*write)(FAR struct inode *inode, FAR const unsigned char *buffer,
|
ssize_t (*write)(FAR struct inode *inode, FAR const unsigned char *buffer,
|
||||||
size_t start_sector, unsigned int nsectors);
|
size_t start_sector, unsigned int nsectors);
|
||||||
int (*geometry)(FAR struct inode *inode, FAR struct geometry *geometry);
|
int (*geometry)(FAR struct inode *inode, FAR struct geometry *geometry);
|
||||||
int (*ioctl)(FAR struct inode *inode, int cmd, unsigned long arg);
|
int (*ioctl)(FAR struct inode *inode, int cmd, unsigned long arg);
|
||||||
};
|
};
|
||||||
@@ -140,16 +141,17 @@ struct mountpt_operations
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int (*open)(FAR struct file *filep, FAR const char *relpath,
|
int (*open)(FAR struct file *filep, FAR const char *relpath,
|
||||||
int oflags, mode_t mode);
|
int oflags, mode_t mode);
|
||||||
|
|
||||||
/* The following methods must be identical in signature and position because
|
/* The following methods must be identical in signature and position
|
||||||
* the struct file_operations and struct mountp_operations are treated like
|
* because the struct file_operations and struct mountp_operations are
|
||||||
* unions.
|
* treated like unions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int (*close)(FAR struct file *filep);
|
int (*close)(FAR struct file *filep);
|
||||||
ssize_t (*read)(FAR struct file *filep, FAR char *buffer, size_t buflen);
|
ssize_t (*read)(FAR struct file *filep, FAR char *buffer, size_t buflen);
|
||||||
ssize_t (*write)(FAR struct file *filep, FAR const char *buffer, size_t buflen);
|
ssize_t (*write)(FAR struct file *filep, FAR const char *buffer,
|
||||||
|
size_t buflen);
|
||||||
off_t (*seek)(FAR struct file *filep, off_t offset, int whence);
|
off_t (*seek)(FAR struct file *filep, off_t offset, int whence);
|
||||||
int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg);
|
int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg);
|
||||||
|
|
||||||
@@ -165,43 +167,74 @@ struct mountpt_operations
|
|||||||
|
|
||||||
/* Directory operations */
|
/* Directory operations */
|
||||||
|
|
||||||
int (*opendir)(FAR struct inode *mountpt, FAR const char *relpath, FAR struct fs_dirent_s *dir);
|
int (*opendir)(FAR struct inode *mountpt, FAR const char *relpath,
|
||||||
int (*closedir)(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir);
|
FAR struct fs_dirent_s *dir);
|
||||||
int (*readdir)(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir);
|
int (*closedir)(FAR struct inode *mountpt,
|
||||||
int (*rewinddir)(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir);
|
FAR struct fs_dirent_s *dir);
|
||||||
|
int (*readdir)(FAR struct inode *mountpt,
|
||||||
|
FAR struct fs_dirent_s *dir);
|
||||||
|
int (*rewinddir)(FAR struct inode *mountpt,
|
||||||
|
FAR struct fs_dirent_s *dir);
|
||||||
|
|
||||||
/* General volume-related mountpoint operations: */
|
/* General volume-related mountpoint operations: */
|
||||||
|
|
||||||
int (*bind)(FAR struct inode *blkdriver, FAR const void *data, FAR void **handle);
|
int (*bind)(FAR struct inode *blkdriver, FAR const void *data,
|
||||||
|
FAR void **handle);
|
||||||
int (*unbind)(FAR void *handle, FAR struct inode **blkdriver);
|
int (*unbind)(FAR void *handle, FAR struct inode **blkdriver);
|
||||||
|
|
||||||
int (*statfs)(FAR struct inode *mountpt, FAR struct statfs *buf);
|
int (*statfs)(FAR struct inode *mountpt, FAR struct statfs *buf);
|
||||||
|
|
||||||
/* Operations on paths */
|
/* Operations on paths */
|
||||||
|
|
||||||
int (*unlink)(FAR struct inode *mountpt, FAR const char *relpath);
|
int (*unlink)(FAR struct inode *mountpt, FAR const char *relpath);
|
||||||
int (*mkdir)(FAR struct inode *mountpt, FAR const char *relpath, mode_t mode);
|
int (*mkdir)(FAR struct inode *mountpt, FAR const char *relpath,
|
||||||
|
mode_t mode);
|
||||||
int (*rmdir)(FAR struct inode *mountpt, FAR const char *relpath);
|
int (*rmdir)(FAR struct inode *mountpt, FAR const char *relpath);
|
||||||
int (*rename)(FAR struct inode *mountpt, FAR const char *oldrelpath, FAR const char *newrelpath);
|
int (*rename)(FAR struct inode *mountpt, FAR const char *oldrelpath,
|
||||||
int (*stat)(FAR struct inode *mountpt, FAR const char *relpath, FAR struct stat *buf);
|
FAR const char *newrelpath);
|
||||||
|
int (*stat)(FAR struct inode *mountpt, FAR const char *relpath,
|
||||||
|
FAR struct stat *buf);
|
||||||
|
|
||||||
/* NOTE: More operations will be needed here to support: disk usage stats
|
/* NOTE: More operations will be needed here to support: disk usage
|
||||||
* file stat(), file attributes, file truncation, etc.
|
* stats file stat(), file attributes, file truncation, etc.
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_DISABLE_MOUNTPOUNT */
|
#endif /* CONFIG_DISABLE_MOUNTPOUNT */
|
||||||
|
|
||||||
|
/* Named OS resources are also maintained by the VFS. This includes:
|
||||||
|
*
|
||||||
|
* - Named semaphores: sem_open(), sem_close(), and sem_unlink()
|
||||||
|
* - POSIX Message Queues: mq_open() and mq_close()
|
||||||
|
* - Shared memory: shm_open() and shm_unlink();
|
||||||
|
*
|
||||||
|
* These are a special case in that they do not follow quite the same
|
||||||
|
* pattern as the other file system types in that they have no read or
|
||||||
|
* write methods.
|
||||||
|
*
|
||||||
|
* Each inode type carries a payload specific to the OS resource;
|
||||||
|
* Only the contents of struct special_operations is visible to the VFS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct inode;
|
||||||
|
struct special_operations
|
||||||
|
{
|
||||||
|
int (*open)(FAR struct inode *inode);
|
||||||
|
int (*close)(FAR struct inode *inode);
|
||||||
|
int (*unlink)(FAR struct inode *inode, FAR const char *relpath);
|
||||||
|
};
|
||||||
|
|
||||||
/* These are the various kinds of operations that can be associated with
|
/* These are the various kinds of operations that can be associated with
|
||||||
* an inode.
|
* an inode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
union inode_ops_u
|
union inode_ops_u
|
||||||
{
|
{
|
||||||
FAR const struct file_operations *i_ops; /* Driver operations for inode */
|
FAR const struct file_operations *i_ops; /* Driver operations for inode */
|
||||||
#ifndef CONFIG_DISABLE_MOUNTPOUNT
|
#ifndef CONFIG_DISABLE_MOUNTPOUNT
|
||||||
FAR const struct block_operations *i_bops; /* Block driver operations */
|
FAR const struct block_operations *i_bops; /* Block driver operations */
|
||||||
FAR const struct mountpt_operations *i_mops; /* Operations on a mountpoint */
|
FAR const struct mountpt_operations *i_mops; /* Operations on a mountpoint */
|
||||||
#endif
|
#endif
|
||||||
|
FAR const struct special_operations *i_xops; /* Generic operations on OS resources */
|
||||||
|
FAR const struct semaphore_operations *i_sops; /* Operations for named semaphores */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This structure represents one inode in the Nuttx pseudo-file system */
|
/* This structure represents one inode in the Nuttx pseudo-file system */
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* General ioctl definitions ************************************************/
|
/* General ioctl definitions ************************************************/
|
||||||
/* Each NuttX ioctl commands are uint16_t's consisting of an 8-bit type
|
/* Each NuttX ioctl commands are uint16_t's consisting of an 8-bit type
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
/* If the erased state of FLASH memory is anything other than 0xff, then this
|
/* If the erased state of FLASH memory is anything other than 0xff, then this
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Data entry declaration prototypes ****************************************/
|
/* Data entry declaration prototypes ****************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Macros to hide implementation */
|
/* Macros to hide implementation */
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* IRQ detach is a convenience definition. Detaching an interrupt handler
|
/* IRQ detach is a convenience definition. Detaching an interrupt handler
|
||||||
* is equivalent to setting a NULL interrupt handler.
|
* is equivalent to setting a NULL interrupt handler.
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
#if CONFIG_MQ_MAXMSGSIZE > 0
|
#if CONFIG_MQ_MAXMSGSIZE > 0
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
#ifdef CONFIG_PAGING
|
#ifdef CONFIG_PAGING
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#ifdef CONFIG_MM_PGALLOC
|
#ifdef CONFIG_MM_PGALLOC
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
/* CONFIG_MM_PGALLOC - Enable page allocator support
|
/* CONFIG_MM_PGALLOC - Enable page allocator support
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Default pthread attribute initializer */
|
/* Default pthread attribute initializer */
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@
|
|||||||
#ifdef CONFIG_PWM
|
#ifdef CONFIG_PWM
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
/* CONFIG_PWM - Enables because PWM driver support
|
/* CONFIG_PWM - Enables because PWM driver support
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/fs/fs.h>
|
#include <nuttx/fs/fs.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* SCSI commands ************************************************************/
|
/* SCSI commands ************************************************************/
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/wqueue.h>
|
#include <nuttx/wqueue.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* SDIO events needed by the driver
|
/* SDIO events needed by the driver
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* If Gregorian time is not supported, then neither is Julian */
|
/* If Gregorian time is not supported, then neither is Julian */
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <nuttx/ascii.h>
|
#include <nuttx/ascii.h>
|
||||||
|
|
||||||
/********************************************************************************************
|
/********************************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#define VT100_SETNL {ASCII_ESC, '[', '2', '0', 'h'} /* Set new line mode */
|
#define VT100_SETNL {ASCII_ESC, '[', '2', '0', 'h'} /* Set new line mode */
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <queue.h>
|
#include <queue.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-Processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
/* CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to
|
/* CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to
|
||||||
|
|||||||
+1
-5
@@ -54,7 +54,7 @@
|
|||||||
#include <time.h> /* Needed for struct timespec */
|
#include <time.h> /* Needed for struct timespec */
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Compilation Switches
|
* Pre-processor Definitions
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
/* Standard POSIX switches */
|
/* Standard POSIX switches */
|
||||||
@@ -67,10 +67,6 @@
|
|||||||
# define _POSIX_THREAD_ATTR_STACKSIZE
|
# define _POSIX_THREAD_ATTR_STACKSIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/********************************************************************************
|
|
||||||
* Definitions
|
|
||||||
********************************************************************************/
|
|
||||||
|
|
||||||
/* Values for the process shared (pshared) attribute */
|
/* Values for the process shared (pshared) attribute */
|
||||||
|
|
||||||
#define PTHREAD_PROCESS_PRIVATE 0
|
#define PTHREAD_PROCESS_PRIVATE 0
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* The C standard specifies two constants, EXIT_SUCCESS and
|
/* The C standard specifies two constants, EXIT_SUCCESS and
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ typedef struct nsem_s nsem_t;
|
|||||||
* Public Variables
|
* Public Variables
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* This is a list of dyanamically allocated named semaphores */
|
/* This is a list of dynamically allocated named semaphores */
|
||||||
|
|
||||||
extern dq_queue_t g_nsems;
|
extern dq_queue_t g_nsems;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user