alfred
844237b396
SMP Lock struct file, filedesc and the global file list.
...
Seigo Tanimura (tanimura) posted the initial delta.
I've polished it quite a bit reducing the need for locking and
adapting it for KSE.
Locks:
1 mutex in each filedesc
protects all the fields.
protects "struct file" initialization, while a struct file
is being changed from &badfileops -> &pipeops or something
the filedesc should be locked.
1 mutex in each struct file
protects the refcount fields.
doesn't protect anything else.
the flags used for garbage collection have been moved to
f_gcflag which was the FILLER short, this doesn't need
locking because the garbage collection is a single threaded
container.
could likely be made to use a pool mutex.
1 sx lock for the global filelist.
struct file * fhold(struct file *fp);
/* increments reference count on a file */
struct file * fhold_locked(struct file *fp);
/* like fhold but expects file to locked */
struct file * ffind_hold(struct thread *, int fd);
/* finds the struct file in thread, adds one reference and
returns it unlocked */
struct file * ffind_lock(struct thread *, int fd);
/* ffind_hold, but returns file locked */
I still have to smp-safe the fget cruft, I'll get to that asap.
2002-01-13 11:58:06 +00:00
..
2001-12-27 20:16:21 +00:00
2001-10-10 23:06:54 +00:00
2001-12-16 17:21:16 +00:00
2001-10-10 23:06:54 +00:00
2001-11-28 03:26:58 +00:00
2002-01-13 11:58:06 +00:00
2001-12-29 07:13:47 +00:00
2001-11-01 20:56:57 +00:00
2002-01-13 11:58:06 +00:00
2001-11-05 15:36:24 +00:00
2002-01-05 08:47:13 +00:00
2002-01-05 08:47:13 +00:00
2002-01-09 04:58:49 +00:00
2002-01-13 11:58:06 +00:00
2001-10-25 17:22:31 +00:00
2002-01-13 11:58:06 +00:00
2002-01-13 11:58:06 +00:00
2002-01-05 21:47:58 +00:00
2002-01-13 11:58:06 +00:00
2001-12-18 00:27:18 +00:00
2002-01-05 08:47:13 +00:00
2001-12-12 05:23:20 +00:00
2001-12-19 01:31:12 +00:00
2002-01-01 21:47:38 +00:00
2001-10-24 01:05:39 +00:00
2001-11-18 18:19:35 +00:00
2001-12-20 22:42:27 +00:00
2001-12-02 12:47:25 +00:00
2001-09-12 08:38:13 +00:00
2001-12-16 16:07:20 +00:00
2001-09-12 08:38:13 +00:00
2001-11-19 00:20:36 +00:00
2002-01-05 08:47:13 +00:00
2001-09-12 08:38:13 +00:00
2001-12-19 00:53:24 +00:00
2002-01-05 17:18:59 +00:00
2002-01-06 00:20:12 +00:00
2001-11-04 18:22:48 +00:00
2001-12-10 05:40:12 +00:00
2002-01-05 08:47:13 +00:00
2002-01-10 01:25:35 +00:00
2002-01-05 08:47:13 +00:00
2001-12-18 00:27:18 +00:00
2001-12-10 05:51:45 +00:00
2002-01-05 08:47:13 +00:00
2001-09-12 08:38:13 +00:00
2001-12-16 02:55:41 +00:00
2001-01-01 23:09:53 +00:00
2001-09-26 19:53:57 +00:00
2001-08-22 04:07:27 +00:00
2001-09-12 08:38:13 +00:00
2001-09-12 08:38:13 +00:00
2001-11-24 10:11:14 +00:00
2001-11-16 21:08:40 +00:00
2001-11-16 21:08:40 +00:00
2001-10-30 15:21:45 +00:00
2001-12-05 01:23:21 +00:00
2001-10-13 09:17:49 +00:00
2001-11-16 02:02:42 +00:00
2001-10-13 09:17:49 +00:00
2001-04-10 07:59:06 +00:00
2001-09-12 08:38:13 +00:00
2002-01-13 11:58:06 +00:00
2001-07-04 16:20:28 +00:00
2001-12-28 18:32:13 +00:00
2001-03-27 10:21:26 +00:00
2001-08-04 18:02:47 +00:00
2001-11-04 11:56:22 +00:00
2002-01-12 02:04:15 +00:00
2001-12-11 05:35:43 +00:00
2001-09-12 08:38:13 +00:00
2001-09-12 08:38:13 +00:00
2001-09-17 21:27:41 +00:00
2001-09-21 22:46:54 +00:00
2001-12-23 22:04:08 +00:00
2001-12-10 05:51:45 +00:00
2001-02-18 10:43:53 +00:00
2001-12-14 09:39:29 +00:00
2002-01-05 09:35:50 +00:00
2001-11-01 16:34:07 +00:00
2001-11-30 21:40:52 +00:00
2001-12-18 09:06:10 +00:00
2001-12-21 21:40:55 +00:00
2002-01-09 07:29:28 +00:00
2002-01-05 09:38:47 +00:00
2002-01-05 08:47:13 +00:00
2002-01-05 08:47:13 +00:00
2002-01-05 08:47:13 +00:00
2002-01-05 08:47:13 +00:00
2001-09-12 08:38:13 +00:00
2002-01-13 11:58:06 +00:00
2002-01-13 11:58:06 +00:00
2001-10-21 23:57:24 +00:00
2002-01-13 11:58:06 +00:00
2001-11-02 17:59:23 +00:00
2001-12-29 07:13:47 +00:00
2001-12-30 18:55:09 +00:00
2001-12-29 07:13:47 +00:00
2001-12-30 18:55:09 +00:00
2001-12-29 07:13:47 +00:00
2001-09-12 08:38:13 +00:00
2001-12-11 10:21:26 +00:00
2001-11-01 20:56:57 +00:00
2001-03-27 10:21:26 +00:00
2001-09-12 08:38:13 +00:00
2001-11-17 00:26:57 +00:00
2001-06-01 21:47:34 +00:00
2001-12-08 04:20:54 +00:00
2001-06-11 12:39:29 +00:00
2001-12-10 05:51:45 +00:00
2001-08-17 22:01:18 +00:00
2002-01-09 01:45:17 +00:00
2002-01-09 01:45:17 +00:00
2001-12-31 17:45:16 +00:00
2002-01-13 11:58:06 +00:00
2002-01-13 11:58:06 +00:00
2002-01-13 11:58:06 +00:00
2002-01-09 06:40:45 +00:00
2001-12-14 01:16:57 +00:00
2002-01-13 11:58:06 +00:00
2001-11-05 18:48:54 +00:00
2001-11-24 01:34:12 +00:00
2001-10-23 01:23:41 +00:00
2001-09-10 11:28:07 +00:00
2002-01-13 11:58:06 +00:00
2001-04-29 02:45:39 +00:00
2002-01-13 11:58:06 +00:00
2001-11-24 01:34:12 +00:00
2002-01-10 18:31:53 +00:00
2002-01-13 11:58:06 +00:00
2002-01-13 11:58:06 +00:00
2002-01-04 05:27:47 +00:00
2001-09-12 08:38:13 +00:00