summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-12 03:42:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-12 03:42:08 +0000
commit95317af605c883b464a4c5b524632193614bfd24 (patch)
treee624625959a92777dd79d8949e46072752103ae9 /nuttx/include
parentbf91815c3fd4be584af323447605624b33932f63 (diff)
downloadpx4-nuttx-95317af605c883b464a4c5b524632193614bfd24.tar.gz
px4-nuttx-95317af605c883b464a4c5b524632193614bfd24.tar.bz2
px4-nuttx-95317af605c883b464a4c5b524632193614bfd24.zip
Add SLIP driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3369 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/net.h9
-rw-r--r--nuttx/include/nuttx/sched.h13
2 files changed, 17 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/net.h b/nuttx/include/nuttx/net.h
index d9b4e42b3..2294a38dc 100644
--- a/nuttx/include/nuttx/net.h
+++ b/nuttx/include/nuttx/net.h
@@ -1,7 +1,7 @@
/****************************************************************************
* nuttx/net.h
*
- * Copyright (C) 2007, 2009-2010 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
@@ -207,6 +207,13 @@ EXTERN int netdev_register(FAR struct uip_driver_s *dev);
EXTERN int netdev_foreach(netdev_callback_t callback, void *arg);
+/* drivers/net/slip.c ******************************************************/
+/* Instantiate a SLIP network interface. */
+
+#ifdef CONFIG_NET_SLIP
+EXTERN int slip_initialize(int intf, const char *devname);
+#endif
+
#undef EXTERN
#ifdef __cplusplus
}
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index c5e061cb6..70c8a746a 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -118,8 +118,8 @@ typedef enum tstate_e tstate_t;
typedef void (*start_t)(void);
-/* This is the entry point into the main thread of the task
- * or into a created pthread within the task.
+/* This is the entry point into the main thread of the task or into a created
+ * pthread within the task.
*/
union entry_u
@@ -129,17 +129,20 @@ union entry_u
};
typedef union entry_u entry_t;
-/* This is the type of the function that is executed with
- * exit() is called (if registered via atexit()).
+/* This is the type of the function that is executed with exit() is called
+ * (if registered via atexit()).
*/
+#ifdef CONFIG_SCHED_ATEXT
typedef void (*exitfunc_t)(void);
+#endif
/* POSIX Message queue */
typedef struct msgq_s msgq_t;
/* The structure used to maintain environment variables */
+
#ifndef CONFIG_DISABLE_ENVIRON
struct environ_s
{
@@ -177,7 +180,9 @@ struct _TCB
pid_t pid; /* This is the ID of the thread */
start_t start; /* Thread start function */
entry_t entry; /* Entry Point into the thread */
+#ifdef CONFIG_SCHED_ATEXT
exitfunc_t exitfunc; /* Called if exit is called. */
+#endif
#ifdef CONFIG_SCHED_WAITPID /* Experimental */
sem_t exitsem; /* Support for waitpid */
int *stat_loc; /* Location to return exit status */