John Baldwin e0569c0798 Clean up the svr4 socket cache and streams code some to make it more easily
locked.
- Move all the svr4 socket cache code into svr4_socket.c, specifically
  move svr4_delete_socket() over from streams.c.  Make the socket cache
  entry structure and svr4_head private to svr4_socket.c as a result.
- Add a mutex to protect the svr4 socket cache.
- Change svr4_find_socket() to copy the sockaddr_un struct into a
  caller-supplied sockaddr_un rather than giving the caller a pointer to
  our internal one.  This removes the one case where code outside of
  svr4_socket.c could access data in the cache.
- Add an eventhandler for process_exit and process_exec to purge the cache
  of any entries for the exiting or execing process.
- Add methods to init and destroy the socket cache and call them from the
  svr4 ABI module's event handler.
- Conditionally grab Giant around socreate() in streamsopen().
- Use fdclose() instead of inlining it in streamsopen() when handling
  socreate() failure.
- Only allocate a stream structure and attach it to a socket in
  streamsopen().  Previously, if a svr4 program performed a stream
  operation on an arbitrary socket not opened via the streams device,
  we would attach streams state data to it and change f_ops of the
  associated struct file while it was in use.  The latter was especially
  not safe, and if a program wants a stream object it should open it via
  the streams device anyway.
- Don't bother locking so_emuldata in the streams code now that we only
  touch it right after creating a socket (in streamsopen()) or when
  tearing it down when the file is closed.
- Remove D_NEEDGIANT from the streams device as it is no longer needed.
2006-07-21 20:40:13 +00:00
..
2006-04-30 16:44:41 +00:00
2006-07-09 16:31:53 +00:00
2006-06-02 23:14:40 +00:00
2006-06-12 03:28:42 +00:00
2006-06-11 22:25:01 +00:00
2006-06-08 08:15:21 +00:00
2006-05-26 13:51:38 +00:00
2006-06-12 04:30:42 +00:00
2006-06-12 04:00:33 +00:00
2006-06-02 23:14:40 +00:00
2006-05-27 09:28:59 +00:00
2006-06-02 23:14:40 +00:00
2006-07-17 22:17:05 +00:00
2006-06-05 17:59:46 +00:00
2006-07-14 04:36:57 +00:00
2006-05-20 21:08:09 +00:00
2006-07-13 11:47:36 +00:00
2006-05-16 15:23:27 +00:00
2006-07-17 21:18:03 +00:00
2006-07-14 04:35:59 +00:00
2006-05-26 13:54:27 +00:00
2006-04-30 16:46:11 +00:00
2006-05-26 13:54:27 +00:00
2006-06-19 11:30:36 +00:00
2006-05-26 18:25:34 +00:00