Public paste
Undefined
By: Guest | Date: May 12 2020 17:53 | Format: None | Expires: never | Size: 381 B | Hits: 459

  1. static std::list<int> gTeams;
  2.  
  3.  
  4. status_t
  5. _kern_get_next_team_info(int32 *cookie, team_info *info)
  6. {
  7.         CALLED();
  8.  
  9.         if (*cookie == 0) {
  10.                 // Put all pids in /proc/ into gTeams
  11.         }
  12.  
  13.         if (*cookie > gTeams.size()) {
  14.                 // empty gTeams
  15.                 *cookie = -1;
  16.                 return B_ERROR;
  17.         }
  18.  
  19.         // get next process    
  20.         _kern_get_team_info(gTeams.get(i), info);
  21.  
  22.         *cookie++;
  23.         return B_OK;
  24. }