コード例 #1
0
ファイル: cmsis_os.c プロジェクト: stateos/StateOS
/// Delete a Semaphore that was created by \ref osSemaphoreCreate.
/// \param[in]     semaphore_id  semaphore object referenced with \ref osSemaphoreCreate.
/// \return status code that indicates the execution status of the function.
/// \note MUST REMAIN UNCHANGED: \b osSemaphoreDelete shall be consistent in every CMSIS-RTOS.
osStatus osSemaphoreDelete (osSemaphoreId semaphore_id)
{
	if (port_isr_inside())
		return osErrorISR;

	sem_kill(semaphore_id);
	return osOK;
}
コード例 #2
0
ファイル: seats.c プロジェクト: bpeynetti/343_aquajet
void kill_standby()
{
    //destroys the standby list
    standby_node* curr = standby_list;
    while(curr != NULL)
    {
        standby_node* temp = curr;
        curr = curr->next;
        free(temp);
    }
    //now set head and tail to null
    standby_list = NULL;
    standby_tail = NULL;
    standby_size = 0;
    sem_kill(&standby_sem);
    
}