Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

11.4.3.3. iniche_net_ready

When the NicheStack stack has completed initialization, it sets the global variable iniche_net_ready to a non-zero value.
Note: Do not call any NicheStack API functions (other than for initialization) until iniche_net_ready is true.

Instantiating the NicheStack TCP/IP Stack Using iniche_net_ready

void SSSInitialTask(void *task_data)
{
   INT8U error_code;
   alt_iniche_init();
   netmain();
       
   while (!iniche_net_ready)
     TK_SLEEP(1);
   /* Now that the stack is running, perform the application
      initialization steps */
      .
      .
      .
}

Macro TK_SLEEP() is part of the NicheStack TCP/IP Stack operating system (OS) porting layer.