lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Fail to get netconn TM4C1294


From: Jin Won Seo
Subject: [lwip-users] Fail to get netconn TM4C1294
Date: Thu, 19 Feb 2015 10:30:27 -0800

Hi.

I am using tm4c1294+lwip1.4.1+FreeRTOS.

the modules that I tested were working well in lwip1.3.1
However, allocating netconn reaches to SYS_SEM_MAX/SYS_MBOX_MAX described in sys_arch.c without freeing it.

I added vQueueDelete() in sys_mbox_free()/sys_sem_free(), but it did not work.

It seems to have something to do with other functions like sys_mbox_set_invalid(),  sys_sem_valid(), sys_sem_set_invalid() since netconn_allocate()/netconn_free() call those in api_msg.c

So I implemented three functions like below:

sys_mbox_set_invalid(sys_mbox_t *mbox)
{
    mbox->queue = SYS_MBOX_NULL;
//    mbox = SYS_MBOX_NULL;
}

int
sys_sem_valid(sys_sem_t *sem)
{
  /*Check if a semaphore has been created*/
  if(sem->queue == SYS_SEM_NULL){
      return 0;
  }
  else{
      return 1;
  }
}

void
sys_sem_set_invalid(sys_sem_t *sem)
{
    sem->queue = SYS_SEM_NULL;
//    sem = SYS_SEM_NULL;
}

It seems sys_sem_free()/sys_mbox_free() are not working properly. How can I fix them?

Thanks,
Jin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]