New LIS331DL driver and VSN updates from Uros

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3457 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-04-03 14:26:05 +00:00
parent 9116f1964e
commit 306d0d331f
7 changed files with 22 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/**************************************************************************
* mqueue.c
* apps/examples/ostest/mqueue.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@ -212,9 +212,9 @@ static void *receiver_thread(void *arg)
* it is not a failure.
*/
if (*get_errno_ptr() != EINTR)
if (errno != EINTR)
{
printf("receiver_thread: ERROR mq_receive failure on msg %d, errno=%d\n", i, *get_errno_ptr());
printf("receiver_thread: ERROR mq_receive failure on msg %d, errno=%d\n", i, errno);
nerrors++;
}
else

View File

@ -1,7 +1,7 @@
/***********************************************************************
* examples/ostest/sighand.c
* apps/examples/ostest/sighand.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -160,7 +160,7 @@ static int waiter_main(int argc, char *argv[])
status = sem_wait(&sem);
if (status != 0)
{
int error = *get_errno_ptr();
int error = errno;
if (error == EINTR)
{
printf("waiter_main: sem_wait() successfully interrupted by signal\n" );

View File

@ -1,7 +1,7 @@
/**************************************************************************
* examples/ostest/mqueue.c
* apps/examples/ostest/mqueue.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@ -157,13 +157,13 @@ static void *sender_thread(void *arg)
status = mq_timedsend(mqfd, msg_buffer, TEST_MSGLEN, 42, &time);
if (status < 0)
{
if (i == TEST_SEND_NMSGS-1 && *get_errno_ptr() == ETIMEDOUT)
if (i == TEST_SEND_NMSGS-1 && errno == ETIMEDOUT)
{
printf("sender_thread: mq_timedsend %d timed out as expected\n", i);
}
else
{
printf("sender_thread: ERROR mq_timedsend failure=%d on msg %d\n", *get_errno_ptr(), i);
printf("sender_thread: ERROR mq_timedsend failure=%d on msg %d\n", errno, i);
nerrors++;
}
}
@ -248,13 +248,13 @@ static void *receiver_thread(void *arg)
nbytes = mq_timedreceive(mqfd, msg_buffer, TEST_MSGLEN, 0, &time);
if (nbytes < 0)
{
if (i == TEST_SEND_NMSGS-1 && *get_errno_ptr() == ETIMEDOUT)
if (i == TEST_SEND_NMSGS-1 && errno == ETIMEDOUT)
{
printf("receiver_thread: Receive %d timed out as expected\n", i);
}
else
{
printf("receiver_thread: ERROR mq_timedreceive failure=%d on msg %d\n", *get_errno_ptr(), i);
printf("receiver_thread: ERROR mq_timedreceive failure=%d on msg %d\n", errno, i);
nerrors++;
}
}

View File

@ -156,7 +156,7 @@ static void binfs_semtake(struct binfs_state_s *bm)
* the wait was awakened by a signal.
*/
ASSERT(*get_errno_ptr() == EINTR);
ASSERT(errno == EINTR);
}
}

View File

@ -492,7 +492,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
* Then loop and send the DISCOVER command again.
*/
else if (*get_errno_ptr() != EAGAIN)
else if (errno != EAGAIN)
{
/* An error other than a timeout was received -- error out */
@ -570,7 +570,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
* 3 times).
*/
else if (*get_errno_ptr() != EAGAIN)
else if (errno != EAGAIN)
{
/* An error other than a timeout was received */

View File

@ -152,7 +152,7 @@ static inline void cgi_semtake(void)
* awakened by a signal.
*/
ASSERT(*get_errno_ptr() == EINTR);
ASSERT(errno == EINTR);
}
}

View File

@ -46,6 +46,7 @@
#include <stdbool.h>
#include <errno.h>
#include <string.h>
#include <apps/apps.h>
@ -98,7 +99,8 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
{
int err = -errno;
int i;
#ifndef CONFIG_APPS_BINDIR
/* On failure, list the set of available built-in commands */
nsh_output(vtbl, "Builtin Apps: ");
@ -116,6 +118,9 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
}
return OK;
#else
return err;
#endif
}
#ifdef CONFIG_SCHED_WAITPID