mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-07-04 11:27:16 -04:00
Compare commits
6 commits
313cd34801
...
605efbd315
Author | SHA1 | Date | |
---|---|---|---|
|
605efbd315 | ||
|
7225fbcbb9 | ||
|
a882b10526 | ||
|
b8d21ede7c | ||
|
b942fdaad0 | ||
|
1973533fd4 |
|
@ -241,7 +241,7 @@ add_library(freertos_kernel STATIC)
|
|||
add_subdirectory(include)
|
||||
add_subdirectory(portable)
|
||||
|
||||
target_sources(freertos_kernel PRIVATE
|
||||
target_sources(freertos_kernel PUBLIC
|
||||
croutine.c
|
||||
event_groups.c
|
||||
list.c
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
|
||||
typedef QueueHandle_t SemaphoreHandle_t;
|
||||
|
||||
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( uint8_t ) 1U )
|
||||
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( uint8_t ) 0U )
|
||||
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( UBaseType_t ) 1U )
|
||||
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( UBaseType_t ) 0U )
|
||||
#define semGIVE_BLOCK_TIME ( ( TickType_t ) 0U )
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,17 @@
|
|||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#ifdef WIN32_LEAN_AND_MEAN
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <timeapi.h>
|
||||
#include <mmsystem.h>
|
||||
#include <winbase.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include "mmsystem.h"
|
||||
#else
|
||||
|
|
|
@ -29,16 +29,7 @@
|
|||
#ifndef PORTMACRO_H
|
||||
#define PORTMACRO_H
|
||||
|
||||
#ifdef WIN32_LEAN_AND_MEAN
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <timeapi.h>
|
||||
#include <mmsystem.h>
|
||||
#include <winbase.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
23
queue.c
23
queue.c
|
@ -1175,9 +1175,8 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
|||
|
||||
traceENTER_xQueueGenericSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken, xCopyPosition );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
||||
configASSERT( ( pxQueue != NULL ) && !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( ( pxQueue != NULL ) && !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
||||
|
||||
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||
* system call (or maximum API call) interrupt priority. Interrupts that are
|
||||
|
@ -1351,16 +1350,14 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
|||
* not (i.e. has a task with a higher priority than us been woken by this
|
||||
* post). */
|
||||
|
||||
configASSERT( pxQueue );
|
||||
|
||||
/* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR()
|
||||
* if the item size is not 0. */
|
||||
configASSERT( pxQueue->uxItemSize == 0 );
|
||||
configASSERT( ( pxQueue != NULL ) && ( pxQueue->uxItemSize == 0 ) );
|
||||
|
||||
/* Normally a mutex would not be given from an interrupt, especially if
|
||||
* there is a mutex holder, as priority inheritance makes no sense for an
|
||||
* interrupts, only tasks. */
|
||||
configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
|
||||
* interrupt, only tasks. */
|
||||
configASSERT( ( pxQueue != NULL ) && !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
|
||||
|
||||
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||
* system call (or maximum API call) interrupt priority. Interrupts that are
|
||||
|
@ -1895,12 +1892,9 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||
|
||||
traceENTER_xQueuePeek( xQueue, pvBuffer, xTicksToWait );
|
||||
|
||||
/* Check the pointer is not NULL. */
|
||||
configASSERT( ( pxQueue ) );
|
||||
|
||||
/* The buffer into which data is received can only be NULL if the data size
|
||||
* is zero (so no data is copied into the buffer. */
|
||||
configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( ( pxQueue != NULL ) && !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
|
||||
/* Cannot block if the scheduler is suspended. */
|
||||
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
|
||||
|
@ -2152,9 +2146,8 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
|
|||
|
||||
traceENTER_xQueuePeekFromISR( xQueue, pvBuffer );
|
||||
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( pxQueue->uxItemSize != 0 ); /* Can't peek a semaphore. */
|
||||
configASSERT( ( pxQueue != NULL ) && !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
|
||||
configASSERT( ( pxQueue != NULL ) && ( pxQueue->uxItemSize != 0 ) ); /* Can't peek a semaphore. */
|
||||
|
||||
/* RTOS ports that support interrupt nesting have the concept of a maximum
|
||||
* system call (or maximum API call) interrupt priority. Interrupts that are
|
||||
|
|
|
@ -1653,11 +1653,9 @@ void vStreamBufferSetStreamBufferNotificationIndex( StreamBufferHandle_t xStream
|
|||
|
||||
traceENTER_vStreamBufferSetStreamBufferNotificationIndex( xStreamBuffer, uxNotificationIndex );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* There should be no task waiting otherwise we'd never resume them. */
|
||||
configASSERT( pxStreamBuffer->xTaskWaitingToReceive == NULL );
|
||||
configASSERT( pxStreamBuffer->xTaskWaitingToSend == NULL );
|
||||
configASSERT( ( pxStreamBuffer != NULL ) && ( pxStreamBuffer->xTaskWaitingToReceive == NULL ) );
|
||||
configASSERT( ( pxStreamBuffer != NULL ) && ( pxStreamBuffer->xTaskWaitingToSend == NULL ) );
|
||||
|
||||
/* Check that the task notification index is valid. */
|
||||
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||
|
|
Loading…
Reference in a new issue