nuttx: resolve various 'FAR' and 'CODE' issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
a4b4fd16e9
commit
1528b8dcca
@ -468,7 +468,7 @@ static void elf_emit_memory(FAR struct elf_dumpinfo_s *cinfo, int memsegs)
|
||||
|
||||
static void elf_emit_tcb_phdr(FAR struct elf_dumpinfo_s *cinfo,
|
||||
FAR struct tcb_s *tcb,
|
||||
FAR Elf_Phdr *phdr, off_t *offset)
|
||||
FAR Elf_Phdr *phdr, FAR off_t *offset)
|
||||
{
|
||||
uintptr_t sp;
|
||||
|
||||
|
@ -258,7 +258,7 @@ static inline void __clear_bit(int nr, uint8_t *addr)
|
||||
*p &= ~mask;
|
||||
}
|
||||
|
||||
static inline int __test_bit(int nr, const volatile uint8_t *addr)
|
||||
static inline int __test_bit(int nr, FAR const volatile uint8_t *addr)
|
||||
{
|
||||
return 1 & (addr[BIT_BYTE(nr)] >> (nr & (BITS_PER_BYTE - 1)));
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ int32_t altcom_injectimage_pkt_compose(FAR void **arg, size_t arglen,
|
||||
int32_t size = 0;
|
||||
|
||||
FAR uint8_t *sending_data = (FAR uint8_t *)arg[0];
|
||||
int len = *(int *)arg[1];
|
||||
bool mode = *(bool *)arg[2];
|
||||
int len = *(FAR int *)arg[1];
|
||||
bool mode = *(FAR bool *)arg[2];
|
||||
|
||||
#ifndef CONFIG_MODEM_ALT1250_DISABLE_PV1
|
||||
if (altver == ALTCOM_VER1)
|
||||
|
@ -278,7 +278,7 @@ static bool is_header_ok(FAR struct altcom_cmdhdr_s *hdr)
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
bool altcom_is_v1pkt_ok(struct altcom_cmdhdr_s *cmdhdr)
|
||||
bool altcom_is_v1pkt_ok(FAR struct altcom_cmdhdr_s *cmdhdr)
|
||||
{
|
||||
struct calculated_checksum checksum;
|
||||
|
||||
@ -292,7 +292,7 @@ bool altcom_is_v1pkt_ok(struct altcom_cmdhdr_s *cmdhdr)
|
||||
&& (cmdhdr->payload[0] == LTE_RESULT_OK);
|
||||
}
|
||||
|
||||
bool altcom_is_v4pkt_ok(struct altcom_cmdhdr_s *cmdhdr)
|
||||
bool altcom_is_v4pkt_ok(FAR struct altcom_cmdhdr_s *cmdhdr)
|
||||
{
|
||||
struct calculated_checksum checksum;
|
||||
|
||||
@ -308,9 +308,10 @@ bool altcom_is_v4pkt_ok(struct altcom_cmdhdr_s *cmdhdr)
|
||||
|
||||
FAR void *altcom_make_poweron_cmd_v1(int *sz)
|
||||
{
|
||||
struct altcom_cmdhdr_s *hdr = (struct altcom_cmdhdr_s *)g_poweron_cmd;
|
||||
struct altcom_cmdfooter_s *footer
|
||||
= (struct altcom_cmdfooter_s *)&hdr->payload[0];
|
||||
FAR struct altcom_cmdhdr_s *hdr =
|
||||
(FAR struct altcom_cmdhdr_s *)g_poweron_cmd;
|
||||
FAR struct altcom_cmdfooter_s *footer =
|
||||
(FAR struct altcom_cmdfooter_s *)&hdr->payload[0];
|
||||
|
||||
set_header_top(hdr, ALTCOM_VER1, ALTCOM_CMDID_POWER_ON_V1);
|
||||
hdr->v1_options = htons(ALTCOM_CMDOPT_CHECKSUM_EN);
|
||||
@ -334,7 +335,8 @@ FAR void *altcom_make_poweron_cmd_v1(int *sz)
|
||||
|
||||
FAR void *altcom_make_poweron_cmd_v4(int *sz)
|
||||
{
|
||||
struct altcom_cmdhdr_s *hdr = (struct altcom_cmdhdr_s *)g_poweron_cmd;
|
||||
FAR struct altcom_cmdhdr_s *hdr =
|
||||
(FAR struct altcom_cmdhdr_s *)g_poweron_cmd;
|
||||
|
||||
set_header_top(hdr, ALTCOM_VER4, ALTCOM_CMDID_POWER_ON_V4);
|
||||
hdr->v4_hdr_cksum = htons(calc_checksum_v4((FAR uint8_t *)hdr,
|
||||
@ -405,8 +407,8 @@ uint16_t altcom_make_header(FAR struct altcom_cmdhdr_s *hdr,
|
||||
|
||||
if (ver == ALTCOM_VER1)
|
||||
{
|
||||
struct altcom_cmdfooter_s *footer
|
||||
= (struct altcom_cmdfooter_s *)&hdr->payload[sz];
|
||||
FAR struct altcom_cmdfooter_s *footer =
|
||||
(FAR struct altcom_cmdfooter_s *)&hdr->payload[sz];
|
||||
|
||||
hdr->v1_options = htons(ALTCOM_CMDOPT_CHECKSUM_EN);
|
||||
hdr->v1_checksum =
|
||||
|
@ -917,7 +917,7 @@ static altmdm_state_t process_state_v1set(uint32_t event,
|
||||
altmdm_state_t state)
|
||||
{
|
||||
int len;
|
||||
void *pkt;
|
||||
FAR void *pkt;
|
||||
|
||||
pkt = altcom_make_poweron_cmd_v1(&len);
|
||||
set_vp(VP_TRYV1);
|
||||
@ -934,7 +934,7 @@ static altmdm_state_t process_state_v4set(uint32_t event,
|
||||
altmdm_state_t state)
|
||||
{
|
||||
int len;
|
||||
void *pkt;
|
||||
FAR void *pkt;
|
||||
|
||||
pkt = altcom_make_poweron_cmd_v4(&len);
|
||||
set_vp(VP_TRYV4);
|
||||
@ -962,7 +962,7 @@ static altmdm_state_t process_state_sleepset(uint32_t event,
|
||||
static altmdm_state_t process_state_txprepare(uint32_t event,
|
||||
altmdm_state_t state)
|
||||
{
|
||||
void *buff;
|
||||
FAR void *buff;
|
||||
int len;
|
||||
|
||||
nxsem_wait_uninterruptible(&g_altmdm_dev.lock_txreq);
|
||||
@ -1217,7 +1217,7 @@ static altmdm_state_t process_state_gotrx(uint32_t event,
|
||||
altmdm_state_t state)
|
||||
{
|
||||
enum version_phase_e vp;
|
||||
void *rcv_data;
|
||||
FAR void *rcv_data;
|
||||
|
||||
state = ALTMDM_STATE_DECIDEDELAY;
|
||||
|
||||
@ -1232,7 +1232,7 @@ static altmdm_state_t process_state_gotrx(uint32_t event,
|
||||
vp = get_vp();
|
||||
if (vp == VP_TRYV1)
|
||||
{
|
||||
if (altcom_is_v1pkt_ok((struct altcom_cmdhdr_s *)rcv_data))
|
||||
if (altcom_is_v1pkt_ok((FAR struct altcom_cmdhdr_s *)rcv_data))
|
||||
{
|
||||
set_vp(VP_V1);
|
||||
set_return_code(ALTMDM_RETURN_RESET_V1);
|
||||
@ -1244,7 +1244,7 @@ static altmdm_state_t process_state_gotrx(uint32_t event,
|
||||
}
|
||||
}
|
||||
else if ((vp == VP_TRYV4)
|
||||
&& altcom_is_v4pkt_ok((struct altcom_cmdhdr_s *)rcv_data))
|
||||
&& altcom_is_v4pkt_ok((FAR struct altcom_cmdhdr_s *)rcv_data))
|
||||
{
|
||||
set_vp(VP_V4);
|
||||
set_return_code(ALTMDM_RETURN_RESET_V4);
|
||||
|
@ -793,7 +793,7 @@ static int gd5f_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
|
||||
case MTDIOC_ECCSTATUS:
|
||||
{
|
||||
uint8_t *result = (FAR uint8_t *)arg;
|
||||
FAR uint8_t *result = (FAR uint8_t *)arg;
|
||||
*result =
|
||||
(priv->eccstatus & GD5F_FEATURE_ECC_MASK)
|
||||
>> GD5F_FEATURE_ECC_OFFSET;
|
||||
|
@ -839,7 +839,7 @@ static int mx35_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
|
||||
case MTDIOC_ECCSTATUS:
|
||||
{
|
||||
uint8_t *result = (FAR uint8_t *)arg;
|
||||
FAR uint8_t *result = (FAR uint8_t *)arg;
|
||||
*result =
|
||||
(priv->eccstatus & MX35_FEATURE_ECC_MASK) >>
|
||||
MX35_FEATURE_ECC_OFFSET;
|
||||
|
@ -3231,7 +3231,7 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev,
|
||||
#ifdef CONFIG_SMART_CRC_8
|
||||
sectorheader->crc8 = smart_calc_sector_crc(dev);
|
||||
#elif defined(CONFIG_SMART_CRC_16)
|
||||
*((uint16_t *)sectorheader->crc16) = smart_calc_sector_crc(dev);
|
||||
*((FAR uint16_t *)sectorheader->crc16) = smart_calc_sector_crc(dev);
|
||||
#elif defined(CONFIG_SMART_CRC_32)
|
||||
*((FAR uint32_t *)sectorheader->crc32) = smart_calc_sector_crc(dev);
|
||||
#endif
|
||||
@ -3393,7 +3393,7 @@ static int smart_relocate_sector(FAR struct smart_struct_s *dev,
|
||||
#ifdef CONFIG_SMART_CRC_8
|
||||
header->crc8 = smart_calc_sector_crc(dev);
|
||||
#elif defined(CONFIG_SMART_CRC_16)
|
||||
*((uint16_t *)header->crc16) = smart_calc_sector_crc(dev);
|
||||
*((FAR uint16_t *)header->crc16) = smart_calc_sector_crc(dev);
|
||||
#elif defined(CONFIG_SMART_CRC_32)
|
||||
*((FAR uint32_t *)header->crc32) = smart_calc_sector_crc(dev);
|
||||
#endif
|
||||
@ -4818,7 +4818,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
|
||||
#ifdef CONFIG_SMART_CRC_8
|
||||
header->crc8 = smart_calc_sector_crc(dev);
|
||||
#elif defined(CONFIG_SMART_CRC_16)
|
||||
*((uint16_t *)header->crc16) = smart_calc_sector_crc(dev);
|
||||
*((FAR uint16_t *)header->crc16) = smart_calc_sector_crc(dev);
|
||||
#elif defined(CONFIG_SMART_CRC_32)
|
||||
*((FAR uint32_t *)header->crc32) = smart_calc_sector_crc(dev);
|
||||
#endif
|
||||
|
@ -1996,7 +1996,7 @@ static ssize_t apds9922_als_read(FAR struct file *filep, FAR char *buffer,
|
||||
return (ssize_t)-EINVAL;
|
||||
}
|
||||
|
||||
ptr = (int *)buffer;
|
||||
ptr = (FAR int *)buffer;
|
||||
|
||||
if (priv->als < 0)
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ static float as726x_getcalibrated(FAR struct as726x_dev_s *priv,
|
||||
colourdata |= ((uint32_t) byte2 << (8 * 1));
|
||||
colourdata |= ((uint32_t) byte3 << (8 * 0));
|
||||
|
||||
return *((float *)(&colourdata));
|
||||
return *((FAR float *)(&colourdata));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -255,7 +255,7 @@ static ssize_t max31865_read(FAR struct file *filep, FAR char *buffer,
|
||||
temp = (-RTD_A + sqrt(RTD_A * RTD_A - 4 * RTD_B * (1 - rt / 100.0))) \
|
||||
/ (2 * RTD_B);
|
||||
|
||||
*(float *)buffer = temp;
|
||||
*(FAR float *)buffer = temp;
|
||||
|
||||
sninfo("MAX31865 ADC: %d, RTD: %.2f, temperature: %.1f\n", \
|
||||
regmsb, rt, temp);
|
||||
|
@ -1779,7 +1779,7 @@ static void uart_launch_foreach(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
if (!strcmp(tcb->name, CONFIG_TTY_LAUNCH_FILEPATH))
|
||||
#endif
|
||||
{
|
||||
*(int *)arg = 1;
|
||||
*(FAR int *)arg = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2435,7 +2435,7 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
||||
*(int *)arg = count;
|
||||
*(FAR int *)arg = count;
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
@ -2461,7 +2461,7 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
||||
*(int *)arg = count;
|
||||
*(FAR int *)arg = count;
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -270,7 +270,7 @@ struct mfs_dirent_s
|
||||
struct timespec st_ctim; /* Time of last status change */
|
||||
struct mfs_ctz_s ctz;
|
||||
uint8_t namelen;
|
||||
FAR char name[];
|
||||
char name[];
|
||||
};
|
||||
|
||||
/* Parent iterator */
|
||||
|
@ -123,7 +123,7 @@ static void ctz_off2loc(FAR const struct mfs_sb_s * const sb, mfs_t off,
|
||||
static mfs_t ctz_blkdatasz(FAR const struct mfs_sb_s * const sb,
|
||||
const mfs_t idx);
|
||||
static void ctz_copyidxptrs(FAR const struct mfs_sb_s * const sb,
|
||||
FAR struct mfs_ctz_s ctz, const mfs_t idx,
|
||||
struct mfs_ctz_s ctz, const mfs_t idx,
|
||||
FAR char *buf);
|
||||
|
||||
/****************************************************************************
|
||||
@ -259,7 +259,7 @@ static mfs_t ctz_blkdatasz(FAR const struct mfs_sb_s * const sb,
|
||||
****************************************************************************/
|
||||
|
||||
static void ctz_copyidxptrs(FAR const struct mfs_sb_s * const sb,
|
||||
FAR struct mfs_ctz_s ctz, const mfs_t idx,
|
||||
struct mfs_ctz_s ctz, const mfs_t idx,
|
||||
FAR char *buf)
|
||||
{
|
||||
mfs_t i;
|
||||
|
@ -691,7 +691,7 @@ int nxffs_verifyblock(FAR struct nxffs_volume_s *volume, off_t block);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxffs_validblock(struct nxffs_volume_s *volume, off_t *block);
|
||||
int nxffs_validblock(FAR struct nxffs_volume_s *volume, FAR off_t *block);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxffs_blockstats
|
||||
|
@ -125,7 +125,7 @@ int nxffs_verifyblock(FAR struct nxffs_volume_s *volume, off_t block)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxffs_validblock(struct nxffs_volume_s *volume, off_t *block)
|
||||
int nxffs_validblock(FAR struct nxffs_volume_s *volume, FAR off_t *block)
|
||||
{
|
||||
off_t i;
|
||||
int ret;
|
||||
|
@ -251,7 +251,7 @@ static inline off_t nxffs_mediacheck(FAR struct nxffs_volume_s *volume,
|
||||
|
||||
static inline int nxffs_startpos(FAR struct nxffs_volume_s *volume,
|
||||
FAR struct nxffs_pack_s *pack,
|
||||
off_t *froffset)
|
||||
FAR off_t *froffset)
|
||||
{
|
||||
struct nxffs_blkentry_s blkentry;
|
||||
off_t offset = *froffset;
|
||||
|
@ -91,7 +91,7 @@
|
||||
|
||||
size_t procfs_memcpy(FAR const char *src, size_t srclen,
|
||||
FAR char *dest, size_t destlen,
|
||||
off_t *offset)
|
||||
FAR off_t *offset)
|
||||
{
|
||||
size_t copysize;
|
||||
size_t lnoffset;
|
||||
|
@ -37,7 +37,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t copyfile(FAR struct file *outfile, FAR struct file *infile,
|
||||
off_t *offset, size_t count)
|
||||
FAR off_t *offset, size_t count)
|
||||
{
|
||||
FAR uint8_t *iobuffer;
|
||||
FAR uint8_t *wrbuffer;
|
||||
@ -243,7 +243,7 @@ static ssize_t copyfile(FAR struct file *outfile, FAR struct file *infile,
|
||||
****************************************************************************/
|
||||
|
||||
ssize_t file_sendfile(FAR struct file *outfile, FAR struct file *infile,
|
||||
off_t *offset, size_t count)
|
||||
FAR off_t *offset, size_t count)
|
||||
{
|
||||
if (count == 0)
|
||||
{
|
||||
@ -327,7 +327,7 @@ ssize_t file_sendfile(FAR struct file *outfile, FAR struct file *infile,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count)
|
||||
ssize_t sendfile(int outfd, int infd, FAR off_t *offset, size_t count)
|
||||
{
|
||||
FAR struct file *outfile;
|
||||
FAR struct file *infile;
|
||||
|
@ -522,7 +522,7 @@ void phase_angle_update(FAR struct phase_angle_f32_s *angle, float val);
|
||||
void svm3_init(FAR struct svm3_state_f32_s *s);
|
||||
void svm3(FAR struct svm3_state_f32_s *s, FAR ab_frame_f32_t *ab);
|
||||
void svm3_current_correct(FAR struct svm3_state_f32_s *s,
|
||||
float *c0, float *c1, float *c2);
|
||||
FAR float *c0, FAR float *c1, FAR float *c2);
|
||||
|
||||
/* Field Oriented Control */
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct procfs_operations
|
||||
* information to manage privileges.
|
||||
*/
|
||||
|
||||
int (*open)(FAR struct file *filep, FAR const char *relpath,
|
||||
CODE int (*open)(FAR struct file *filep, FAR const char *relpath,
|
||||
int oflags, mode_t mode);
|
||||
|
||||
/* The following methods must be identical in signature and position
|
||||
@ -52,14 +52,12 @@ struct procfs_operations
|
||||
* treated like unions.
|
||||
*/
|
||||
|
||||
int (*close)(FAR struct file *filep);
|
||||
ssize_t (*read)(FAR struct file *filep,
|
||||
FAR char *buffer,
|
||||
CODE int (*close)(FAR struct file *filep);
|
||||
CODE ssize_t (*read)(FAR struct file *filep, FAR char *buffer,
|
||||
size_t buflen);
|
||||
ssize_t (*write)(FAR struct file *filep,
|
||||
FAR const char *buffer,
|
||||
CODE ssize_t (*write)(FAR struct file *filep, FAR const char *buffer,
|
||||
size_t buflen);
|
||||
int (*poll)(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
CODE int (*poll)(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
bool setup);
|
||||
|
||||
/* The two structures need not be common after this point. The following
|
||||
@ -69,20 +67,20 @@ struct procfs_operations
|
||||
* Additional open-file-specific procfs operations:
|
||||
*/
|
||||
|
||||
int (*dup)(FAR const struct file *oldp,
|
||||
FAR struct file *newp);
|
||||
CODE int (*dup)(FAR const struct file *oldp, FAR struct file *newp);
|
||||
|
||||
/* Directory operations */
|
||||
|
||||
int (*opendir)(FAR const char *relpath,
|
||||
CODE int (*opendir)(FAR const char *relpath,
|
||||
FAR struct fs_dirent_s **dir);
|
||||
int (*closedir)(FAR struct fs_dirent_s *dir);
|
||||
int (*readdir)(FAR struct fs_dirent_s *dir, FAR struct dirent *entry);
|
||||
int (*rewinddir)(FAR struct fs_dirent_s *dir);
|
||||
CODE int (*closedir)(FAR struct fs_dirent_s *dir);
|
||||
CODE int (*readdir)(FAR struct fs_dirent_s *dir,
|
||||
FAR struct dirent *entry);
|
||||
CODE int (*rewinddir)(FAR struct fs_dirent_s *dir);
|
||||
|
||||
/* Operations on paths */
|
||||
|
||||
int (*stat)(FAR const char *relpath, FAR struct stat *buf);
|
||||
CODE int (*stat)(FAR const char *relpath, FAR struct stat *buf);
|
||||
};
|
||||
|
||||
/* Procfs handler prototypes ************************************************/
|
||||
@ -135,7 +133,7 @@ struct procfs_meminfo_entry_s
|
||||
{
|
||||
FAR const char *name;
|
||||
FAR struct mm_heap_s *heap;
|
||||
struct procfs_meminfo_entry_s *next;
|
||||
FAR struct procfs_meminfo_entry_s *next;
|
||||
#if CONFIG_MM_BACKTRACE >= 0
|
||||
|
||||
/* This is dynamic control flag whether to turn on backtrace in the heap,
|
||||
@ -202,7 +200,7 @@ extern "C"
|
||||
|
||||
size_t procfs_memcpy(FAR const char *src, size_t srclen,
|
||||
FAR char *dest, size_t destlen,
|
||||
off_t *offset);
|
||||
FAR off_t *offset);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: procfs_snprintf
|
||||
|
@ -26,6 +26,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
/* If CONFIG_ARCH_MATH_H is defined, then the top-level Makefile will copy
|
||||
* this header file to include/math.h where it will become the system math.h
|
||||
@ -225,12 +226,12 @@ double fabs (double x);
|
||||
long double fabsl (long double x);
|
||||
#endif
|
||||
|
||||
float modff (float x, float *iptr);
|
||||
float modff (float x, FAR float *iptr);
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
double modf (double x, double *iptr);
|
||||
double modf (double x, FAR double *iptr);
|
||||
#endif
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
long double modfl (long double x, long double *iptr);
|
||||
long double modfl (long double x, FAR long double *iptr);
|
||||
#endif
|
||||
|
||||
float fmodf (float x, float div);
|
||||
@ -388,22 +389,22 @@ double ldexp (double x, int n);
|
||||
long double ldexpl(long double x, int n);
|
||||
#endif
|
||||
|
||||
float frexpf(float x, int *exp);
|
||||
float frexpf(float x, FAR int *exp);
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
double frexp (double x, int *exp);
|
||||
double frexp (double x, FAR int *exp);
|
||||
#endif
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
long double frexpl(long double x, int *exp);
|
||||
long double frexpl(long double x, FAR int *exp);
|
||||
#endif
|
||||
|
||||
/* Trigonometric Functions **************************************************/
|
||||
|
||||
void sincosf(float, float *, float *);
|
||||
void sincosf(float, FAR float *, FAR float *);
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
void sincos(double, double *, double *);
|
||||
void sincos(double, FAR double *, FAR double *);
|
||||
#endif
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
void sincosl(long double, long double *, long double *);
|
||||
void sincosl(long double, FAR long double *, FAR long double *);
|
||||
#endif
|
||||
|
||||
float sinf (float x);
|
||||
@ -545,12 +546,12 @@ double trunc (double x);
|
||||
long double truncl (long double x);
|
||||
#endif
|
||||
|
||||
float nanf(const char *tagp);
|
||||
float nanf(FAR const char *tagp);
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
double nan(const char *tagp);
|
||||
double nan(FAR const char *tagp);
|
||||
#endif
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
long double nanl(const char *tagp);
|
||||
long double nanl(FAR const char *tagp);
|
||||
#endif
|
||||
|
||||
float nearbyintf(float x);
|
||||
|
@ -400,7 +400,7 @@ void net_unlock(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_timedwait(sem_t *sem, unsigned int timeout);
|
||||
int net_sem_timedwait(FAR sem_t *sem, unsigned int timeout);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_mutex_timedlock
|
||||
@ -424,7 +424,7 @@ int net_sem_timedwait(sem_t *sem, unsigned int timeout);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_mutex_timedlock(mutex_t *mutex, unsigned int timeout);
|
||||
int net_mutex_timedlock(FAR mutex_t *mutex, unsigned int timeout);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_sem_wait
|
||||
@ -446,7 +446,7 @@ int net_mutex_timedlock(mutex_t *mutex, unsigned int timeout);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_wait(sem_t *sem);
|
||||
int net_sem_wait(FAR sem_t *sem);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_mutex_lock
|
||||
@ -468,7 +468,7 @@ int net_sem_wait(sem_t *sem);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_mutex_lock(mutex_t *mutex);
|
||||
int net_mutex_lock(FAR mutex_t *mutex);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_sem_timedwait_uninterruptible
|
||||
@ -487,7 +487,7 @@ int net_mutex_lock(mutex_t *mutex);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_timedwait_uninterruptible(sem_t *sem, unsigned int timeout);
|
||||
int net_sem_timedwait_uninterruptible(FAR sem_t *sem, unsigned int timeout);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: net_sem_wait_uninterruptible
|
||||
@ -505,7 +505,7 @@ int net_sem_timedwait_uninterruptible(sem_t *sem, unsigned int timeout);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_wait_uninterruptible(sem_t *sem);
|
||||
int net_sem_wait_uninterruptible(FAR sem_t *sem);
|
||||
|
||||
#ifdef CONFIG_MM_IOB
|
||||
|
||||
@ -955,7 +955,7 @@ ssize_t psock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ssize_t psock_send(FAR struct socket *psock, const void *buf, size_t len,
|
||||
ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
|
||||
int flags);
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -435,7 +435,7 @@ struct nxsvrmsg_getrectangle_s
|
||||
unsigned int plane; /* The plane number to read */
|
||||
FAR uint8_t *dest; /* Memory location in which to store the graphics data */
|
||||
unsigned int deststride; /* Width of the destination memory in bytes */
|
||||
sem_t *sem_done; /* Semaphore to report when command is done. */
|
||||
FAR sem_t *sem_done; /* Semaphore to report when command is done. */
|
||||
};
|
||||
|
||||
/* Fill a trapezoidal region in the window with a color */
|
||||
|
@ -26,6 +26,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -97,7 +97,7 @@ static void lib_dumpvfile_handler(FAR void *arg, FAR const char *fmt,
|
||||
...)
|
||||
{
|
||||
va_list ap;
|
||||
int *fd = (int *)arg;
|
||||
FAR int *fd = (FAR int *)arg;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vdprintf(*fd, fmt, ap);
|
||||
|
@ -57,8 +57,8 @@
|
||||
#define swapcode(TYPE, parmi, parmj, n) \
|
||||
{ \
|
||||
long i = (n) / sizeof(TYPE); \
|
||||
register TYPE *pi = (TYPE *)(parmi); \
|
||||
register TYPE *pj = (TYPE *)(parmj); \
|
||||
register FAR TYPE *pi = (FAR TYPE *)(parmi); \
|
||||
register FAR TYPE *pj = (FAR TYPE *)(parmj); \
|
||||
do { \
|
||||
register TYPE t = *pi; \
|
||||
*pi++ = *pj; \
|
||||
@ -73,9 +73,9 @@
|
||||
#define swap(a, b) \
|
||||
if (swaptype == 0) \
|
||||
{ \
|
||||
long t = *(long *)(a); \
|
||||
*(long *)(a) = *(long *)(b); \
|
||||
*(long *)(b) = t; \
|
||||
long t = *(FAR long *)(a); \
|
||||
*(FAR long *)(a) = *(FAR long *)(b); \
|
||||
*(FAR long *)(b) = t; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
|
@ -356,7 +356,7 @@ void svm3(FAR struct svm3_state_f32_s *s, FAR ab_frame_f32_t *v_ab)
|
||||
****************************************************************************/
|
||||
|
||||
void svm3_current_correct(FAR struct svm3_state_f32_s *s,
|
||||
float *c0, float *c1, float *c2)
|
||||
FAR float *c0, FAR float *c1, FAR float *c2)
|
||||
{
|
||||
/* Get best ADC samples according to SVM sector.
|
||||
*
|
||||
|
@ -31,9 +31,9 @@
|
||||
"fmod","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double"
|
||||
"fmodf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float"
|
||||
"fmodl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double"
|
||||
"frexp","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","int *"
|
||||
"frexpf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","int *"
|
||||
"frexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","int *"
|
||||
"frexp","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","FAR int *"
|
||||
"frexpf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","FAR int *"
|
||||
"frexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","FAR int *"
|
||||
"gamma","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double"
|
||||
"ldexp","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","int"
|
||||
"ldexpf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","int"
|
||||
@ -48,9 +48,9 @@
|
||||
"log2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double"
|
||||
"logf","math.h","!defined(CONFIG_LIBM_NONE)","float","float"
|
||||
"logl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double"
|
||||
"modf","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double *"
|
||||
"modff","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float *"
|
||||
"modfl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double *"
|
||||
"modf","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","FAR double *"
|
||||
"modff","math.h","!defined(CONFIG_LIBM_NONE)","float","float","FAR float *"
|
||||
"modfl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","FAR long double *"
|
||||
"pow","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double"
|
||||
"powf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float"
|
||||
"powl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double"
|
||||
|
Can't render this file because it has a wrong number of fields in line 8.
|
@ -29,13 +29,15 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
float frexpf(float x, int *exponent)
|
||||
float frexpf(float x, FAR int *exponent)
|
||||
{
|
||||
float res;
|
||||
|
||||
|
@ -29,6 +29,9 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
@ -37,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
double modf(double x, double *iptr)
|
||||
double modf(double x, FAR double *iptr)
|
||||
{
|
||||
if (fabs(x) >= 4503599627370496.0)
|
||||
{
|
||||
|
@ -29,13 +29,15 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
float modff(float x, float *iptr)
|
||||
float modff(float x, FAR float *iptr)
|
||||
{
|
||||
if (fabsf(x) >= 8388608.0F)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
long double modfl(long double x, long double *iptr)
|
||||
long double modfl(long double x, FAR long double *iptr)
|
||||
{
|
||||
if (fabsl(x) >= 4503599627370496.0)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
double nan(const char *tagp)
|
||||
double nan(FAR const char *tagp)
|
||||
{
|
||||
return (double)NAN;
|
||||
}
|
||||
|
@ -22,7 +22,6 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <math.h>
|
||||
@ -31,7 +30,7 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
float nanf(const char *tagp)
|
||||
float nanf(FAR const char *tagp)
|
||||
{
|
||||
return (float)NAN;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
long double nanl(const char *tagp)
|
||||
long double nanl(FAR const char *tagp)
|
||||
{
|
||||
return (long double)NAN;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifdef CONFIG_HAVE_DOUBLE
|
||||
|
||||
nooptimiziation_function
|
||||
void sincos(double x, double *s, double *c)
|
||||
void sincos(double x, FAR double *s, FAR double *c)
|
||||
{
|
||||
*s = sin(x);
|
||||
*c = cos(x);
|
||||
|
@ -22,7 +22,6 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <math.h>
|
||||
@ -40,7 +39,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
nooptimiziation_function
|
||||
void sincosf(float x, float *s, float *c)
|
||||
void sincosf(float x, FAR float *s, FAR float *c)
|
||||
{
|
||||
*s = sinf(x);
|
||||
*c = cosf(x);
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
|
||||
nooptimiziation_function
|
||||
void sincosl(long double x, long double *s, long double *c)
|
||||
void sincosl(long double x, FAR long double *s, FAR long double *c)
|
||||
{
|
||||
*s = sinl(x);
|
||||
*c = cosl(x);
|
||||
|
@ -75,9 +75,9 @@ static int local_sendctl(FAR struct local_conn_s *conn,
|
||||
FAR struct local_conn_s *peer;
|
||||
FAR struct file *filep2;
|
||||
FAR struct file *filep;
|
||||
struct cmsghdr *cmsg;
|
||||
FAR struct cmsghdr *cmsg;
|
||||
int count = 0;
|
||||
int *fds;
|
||||
FAR int *fds;
|
||||
int ret;
|
||||
int i = 0;
|
||||
|
||||
@ -98,7 +98,7 @@ static int local_sendctl(FAR struct local_conn_s *conn,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
fds = (int *)CMSG_DATA(cmsg);
|
||||
fds = (FAR int *)CMSG_DATA(cmsg);
|
||||
count = (cmsg->cmsg_len - sizeof(struct cmsghdr)) / sizeof(int);
|
||||
|
||||
if (count + peer->lc_cfpcount >= LOCAL_NCONTROLFDS)
|
||||
|
@ -61,7 +61,7 @@ static rmutex_t g_netlock = NXRMUTEX_INITIALIZER;
|
||||
****************************************************************************/
|
||||
|
||||
static int
|
||||
_net_timedwait(sem_t *sem, bool interruptible, unsigned int timeout)
|
||||
_net_timedwait(FAR sem_t *sem, bool interruptible, unsigned int timeout)
|
||||
{
|
||||
unsigned int count;
|
||||
int blresult;
|
||||
@ -231,7 +231,7 @@ int net_restorelock(unsigned int count)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_timedwait(sem_t *sem, unsigned int timeout)
|
||||
int net_sem_timedwait(FAR sem_t *sem, unsigned int timeout)
|
||||
{
|
||||
return _net_timedwait(sem, true, timeout);
|
||||
}
|
||||
@ -258,7 +258,7 @@ int net_sem_timedwait(sem_t *sem, unsigned int timeout)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_mutex_timedlock(mutex_t *mutex, unsigned int timeout)
|
||||
int net_mutex_timedlock(FAR mutex_t *mutex, unsigned int timeout)
|
||||
{
|
||||
unsigned int count;
|
||||
int blresult;
|
||||
@ -313,7 +313,7 @@ int net_mutex_timedlock(mutex_t *mutex, unsigned int timeout)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_wait(sem_t *sem)
|
||||
int net_sem_wait(FAR sem_t *sem)
|
||||
{
|
||||
return net_sem_timedwait(sem, UINT_MAX);
|
||||
}
|
||||
@ -338,7 +338,7 @@ int net_sem_wait(sem_t *sem)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_mutex_lock(mutex_t *mutex)
|
||||
int net_mutex_lock(FAR mutex_t *mutex)
|
||||
{
|
||||
return net_mutex_timedlock(mutex, UINT_MAX);
|
||||
}
|
||||
@ -360,7 +360,7 @@ int net_mutex_lock(mutex_t *mutex)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_timedwait_uninterruptible(sem_t *sem, unsigned int timeout)
|
||||
int net_sem_timedwait_uninterruptible(FAR sem_t *sem, unsigned int timeout)
|
||||
{
|
||||
return _net_timedwait(sem, false, timeout);
|
||||
}
|
||||
@ -381,7 +381,7 @@ int net_sem_timedwait_uninterruptible(sem_t *sem, unsigned int timeout)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_sem_wait_uninterruptible(sem_t *sem)
|
||||
int net_sem_wait_uninterruptible(FAR sem_t *sem)
|
||||
{
|
||||
return net_sem_timedwait_uninterruptible(sem, UINT_MAX);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user