Changeset 5540

Show
Ignore:
Timestamp:
07/05/12 23:02:59 (7 years ago)
Author:
cmatthew
Message:

Updates to poll and a tester.

Location:
seattle/branches/nacl_repy/seattlelib
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • seattle/branches/nacl_repy/seattlelib/lind_net_calls.py

    r5538 r5540  
    12451245 
    12461246  retval = 0 
     1247 
    12471248  # the bit vectors only support 1024 file descriptors, also lower FDs are not supported 
    1248   if nfds < 10 or nfds > 1024: 
    1249     raise SyscallError("select_syscall","EINVAL","number of FDs is wrong.") 
     1249  if nfds < STARTINGFD or nfds > MAX_FD: 
     1250    raise SyscallError("select_syscall","EINVAL","number of FDs is wrong: %s"%(str(nfds))) 
    12501251 
    12511252  new_readfds = [] 
     
    13631364 
    13641365  reply = [] 
    1365  
    13661366  for structpoll in fds: 
    13671367    fd = structpoll['fd'] 
     
    13791379    if err: 
    13801380      errors.append(fd) 
    1381     #print reads, writes, errors 
    1382  
     1381     
    13831382    newfd = select_syscall(fd, reads, writes, errors, 0) 
    13841383 
     
    13921391      return_code += 1 
    13931392    structpoll['revents'] = mask 
    1394  
    1395   return return_code, structpoll 
    1396  
    1397  
     1393  return return_code, fds 
     1394 
     1395 
  • seattle/branches/nacl_repy/seattlelib/net_poll.repy

    r5523 r5540  
    3636        return ErrorResponseBuilder("net_poll", e[1], e[2]) 
    3737 
    38     data = pack_struct_pollfds([result[1]], nfds) 
     38    data = pack_struct_pollfds(result[1], nfds) 
    3939 
    4040    return SuccessResponseBuilder("net_poll", result[0], data)