rem: sys_sem_wait(mutex);
add: LWP_SemWait(memp_sem);
context: memp_malloc(memp_t type){  struct memp *memp;  void *mem;#if SYS_LIGHTWEIGHT_PROT  SYS_ARCH_DECL_PROTECT(old_level);#endif   LWIP_ASSERT("memp_malloc: type < MEMP_MAX", type < MEMP_MAX);#if SYS_LIGHTWEIGHT_PROT  SYS_ARCH_PROTECT(old_level);#else /* SYS_LIGHTWEIGHT_PROT */    sys_sem_wait(mutex);#endif /* SYS_LIGHTWEIGHT_PROT */    memp = memp_tab[type];    if (memp != NULL) {        memp_tab[type] = memp->next;        memp->next = NULL;#if MEMP_STATS    ++lwip_stats.memp[type].used;    if (lwip_stats.memp[type].used > lwip_stats.memp[type].max) {      lwip_stats.memp[type].max = lwip_stats.memp[type].used;    }#endif /* MEMP_STATS */#if SYS_LIGHTWEIGHT_PROT    SYS_ARCH_UNPROTECT(old_level);#else /* SYS_LIGHTWEIGHT_PROT */    sys_sem_signal(mutex);#endif /* SYS_LIGHTWEIGHT_PROT */      LWIP_ASSERT("memp_malloc: memp properly aligned",     ((mem_ptr_t)MEM_ALIGN((u8_t *)memp + sizeof(struct memp)) % MEM_ALIGNMENT) == 0);    mem = MEM_ALIGN((u8_t *)memp + sizeof(struct memp));    return mem;  } else {    LWIP_DEBUGF(MEMP_DEBUG | 2, ("memp_malloc: out of memory in pool %d\n", type));#if MEMP_STATS    ++lwip_stats.memp[type].err;#endif /* MEMP_STATS */#if SYS_LIGHTWEIGHT_PROT  SYS_ARCH_UNPROTECT(old_level);#else /* SYS_LIGHTWEIGHT_PROT */  sys_sem_signal(mutex);#endif /* SYS_LIGHTWEIGHT_PROT */      return NULL;  }}