summaryrefslogtreecommitdiff
path: root/Source/include
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-05-23 19:24:05 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-05-23 19:24:05 +0000
commit78458a3e2719d52234126505e3cd4fc319137b17 (patch)
tree0fcdfbaaa0a014c6fa283fa40e88f9a00ed78f9e /Source/include
parent34cac801e01a8b6ffac4a12f66fc4a742d7242ff (diff)
downloadfreertos-78458a3e2719d52234126505e3cd4fc319137b17.tar.gz
freertos-78458a3e2719d52234126505e3cd4fc319137b17.tar.bz2
freertos-78458a3e2719d52234126505e3cd4fc319137b17.tar.xz
Add queue registry code.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@384 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source/include')
-rw-r--r--Source/include/FreeRTOS.h11
-rw-r--r--Source/include/queue.h26
2 files changed, 37 insertions, 0 deletions
diff --git a/Source/include/FreeRTOS.h b/Source/include/FreeRTOS.h
index 3d64d459..7e2ca21c 100644
--- a/Source/include/FreeRTOS.h
+++ b/Source/include/FreeRTOS.h
@@ -198,6 +198,17 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
#endif
+#ifndef configQUEUE_REGISTRY_SIZE
+ #define configQUEUE_REGISTRY_SIZE 0
+#endif
+
+#if configQUEUE_REGISTRY_SIZE < 1
+ #define configQUEUE_REGISTRY_SIZE 0
+ #define vQueueAddToRegistry( xQueue, pcName )
+ #define vQueueUnregisterQueue( xQueue )
+#endif
+
+
/* Remove any unused trace macros. */
#ifndef traceSTART
/* Used to perform any necessary initialisation - for example, open a file
diff --git a/Source/include/queue.h b/Source/include/queue.h
index b0d8cda2..2f7dff4f 100644
--- a/Source/include/queue.h
+++ b/Source/include/queue.h
@@ -1203,6 +1203,32 @@ xQueueHandle xQueueCreateCountingSemaphore( unsigned portBASE_TYPE uxCountValue,
portBASE_TYPE xQueueTakeMutexRecursive( xQueueHandle xMutex, portTickType xBlockTime );
portBASE_TYPE xQueueGiveMutexRecursive( xQueueHandle xMutex );
+/*
+ * The registry is provided as a means for kernel aware debuggers to
+ * locate queues, semaphores and mutexes. Call vQueueAddToRegistry() add
+ * a queue, semaphore or mutex handle to the registry if you want the handle
+ * to be available to a kernel aware debugger. If you are not using a kernel
+ * aware debugger then this function can be ignored.
+ *
+ * configQUEUE_REGISTRY_SIZE defines the maximum number of handles the
+ * registry can hold. configQUEUE_REGISTRY_SIZE must be greater than 0
+ * within FreeRTOSConfig.h for the registry to be available. Its value
+ * does not effect the number of queues, semaphores and mutexes that can be
+ * created - just the number that the registry can hold.
+ *
+ * @param xQueue The handle of the queue being added to the registry. This
+ * is the handle returned by a call to xQueueCreate(). Semaphore and mutex
+ * handles can also be passed in here.
+ *
+ * @param pcName The name to be associated with the handle. This is the
+ * name that the kernel aware debugger will display.
+ */
+#if configQUEUE_REGISTRY_SIZE > 0
+ void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcName );
+#endif
+
+
+
#ifdef __cplusplus
}