PT_WAIT_UNTIL(&socket->socketpt, newdata_available(socket));
PT_WAIT_UNTIL(&socket->socketpt, socket_newdata(socket));
PT_THREAD(socket_readto(struct socket *socket, unsigned char c)){  PT_START(&socket->socketpt);  uipbuf_setup(&socket->buf, socket->bufptr, socket->bufsize);    /* XXX: Should add uipbuf_checkmarker() before do{} loop, if     incoming data has been handled while waiting for a write. */  do {    if(socket->readlen == 0) {      PT_WAIT_UNTIL(&socket->socketpt, newdata_available(socket));        socket->state = SOCKET_STATE_READ;      socket->readptr = (u8_t *)uip_appdata;      socket->readlen = uip_datalen();    }  } while((uipbuf_bufto(&socket->buf, c,			&socket->readptr,			&socket->readlen) & UIPBUF_FOUND) == 0 &&	  socket->readlen > 0);  if(uipbuf_len(&socket->buf) == 0) {    socket->state = SOCKET_STATE_NONE;    PT_RESTART(&socket->socketpt);  }    PT_EXIT(&socket->socketpt);}