diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-09-29 04:58:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:04 -0400 |
commit | 730760e90a173ef81f89beed2f1dad2fab310f68 (patch) | |
tree | e60039deb19683fac30e58277450c657ecd33e07 /arch/um/drivers/random.c | |
parent | b10aeeef554eb1ff80e10111829f6e7484877811 (diff) |
[PATCH] uml: locking documentation
Some locking documentation and a cleanup. uml_exitcode is copied into a local
before sprintf sees it, in case sprintf does anything non-atomic with it.
The rest are comments about why certain globals don't need any kind of
locking.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/random.c')
-rw-r--r-- | arch/um/drivers/random.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index ae9909415b9c..73b2bdd6d2d3 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -20,6 +20,10 @@ | |||
20 | 20 | ||
21 | #define RNG_MISCDEV_MINOR 183 /* official */ | 21 | #define RNG_MISCDEV_MINOR 183 /* official */ |
22 | 22 | ||
23 | /* Changed at init time, in the non-modular case, and at module load | ||
24 | * time, in the module case. Presumably, the module subsystem | ||
25 | * protects against a module being loaded twice at the same time. | ||
26 | */ | ||
23 | static int random_fd = -1; | 27 | static int random_fd = -1; |
24 | 28 | ||
25 | static int rng_dev_open (struct inode *inode, struct file *filp) | 29 | static int rng_dev_open (struct inode *inode, struct file *filp) |