rtems-net: network sema obtain: network not initialised error

787562067 googcheng at qq.com
Fri Mar 22 10:44:07 UTC 2019


I called select function , why report this error?




Hello, I'm waiting for input..
\0wait 5s 
select begin
rtems-net: network sema obtain: network not initialised







code:
=============================
int uart_recv(int fd, char *rcv_buf,int data_len)  
{  
    int len,fs_sel;  
    fd_set fs_read;  
     
    struct timeval time;  
     
    FD_ZERO(&fs_read);  
    FD_SET(fd,&fs_read);  
     
    time.tv_sec = 4;  
    time.tv_usec = 0;  
     
    printf("select begin\n");
    fs_sel = select(fd+1,&fs_read,NULL,NULL,&time);  
    printf("fs_sel = %d\n",fs_sel);  
    if(fs_sel)  
    {  
	len = read(fd,rcv_buf,data_len);  
	printf("I am right!(version1.2) len = %d fs_sel = %d\n",len,fs_sel);  
	return len;  
    }  
    else  
    {  
	printf("Sorry,I am wrong!");  
	return FALSE;  
    }       
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190322/41f0dcf9/attachment.html>


More information about the users mailing list