Beispiel #1
0
void
sys_sem_free(sys_sem_t* sem)
{
    /* No op (allocated in stack) */
    
    sys_sem_set_invalid(sem);
}
Beispiel #2
0
void sys_sem_free(sys_sem_t *sem)
{
    if (!!sem && !!*sem) {
	sys_sem_set_invalid(sem);
	free(*sem);
	*sem = NULL;
    }
}
Beispiel #3
0
/**
 * Delete a netconn and all its resources.
 * The pcb is NOT freed (since we might not be in the right thread context do this).
 *
 * @param conn the netconn to free
 */
void
netconn_free(struct netconn *conn)
{
    LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL);
    LWIP_ASSERT("recvmbox must be deallocated before calling this function",
                !sys_mbox_valid(&conn->recvmbox));
#if LWIP_TCP
    LWIP_ASSERT("acceptmbox must be deallocated before calling this function",
                !sys_mbox_valid(&conn->acceptmbox));
#endif /* LWIP_TCP */

    sys_sem_free(&conn->op_completed);
    sys_sem_set_invalid(&conn->op_completed);

    memp_free(MEMP_NETCONN, conn);
}
Beispiel #4
0
/* Deallocates a semaphore. */
void sys_sem_free(sys_sem_t *sem)
{
    /* allocated on stack -> no op */
    sys_sem_set_invalid(sem);
}