void init_avb_1722_router_table_simple() { int i; // table_lock = __hwlock_init(); swlock_init(&table_lock); for(i=0;i<AVB_MAX_NUM_SINK_AND_FORWARD_STREAMS;i++) { router_table[i].id[0] = 0; router_table[i].id[1] = 0; } }
void init_queue(mii_queue_t *q) { #ifndef ETHERNET_USE_HARDWARE_LOCKS static int next_qlock = 1; q->lock = (int) &queue_locks[next_qlock]; next_qlock++; swlock_init((swlock_t *) q->lock); #endif q->rdIndex = 0; q->wrIndex = 0; return; }