-/*
+/*
pseudo.h (c) 1997-8 Grant R. Guenther <grant@torque.net>
Under the terms of the GNU public license.
jiffy. If nice is 0, the test will also be done whenever
the scheduler runs (by adding it to a task queue). If
nice is greater than 1, the test will be done once every
- (nice-1) jiffies.
+ (nice-1) jiffies.
*/
1.01 1998.05.03 Switched from cli()/sti() to spinlocks
1.02 1998.12.14 Added support for nice > 1
*/
-
+
#define PS_VERSION "1.02"
#include <linux/sched.h>
static struct timer_list ps_timer = {0,0,0,0,ps_timer_int};
static struct tq_struct ps_tq = {0,0,ps_tq_int,NULL};
-static void ps_set_intr( void (*continuation)(void),
+static void ps_set_intr( void (*continuation)(void),
int (*ready)(void),
int timeout, int nice )
-
-{ long flags;
+{
+ long flags;
spin_lock_irqsave(&ps_spinlock,flags);
}
static void ps_tq_int( void *data )
-
-{ void (*con)(void);
+{
+ void (*con)(void);
long flags;
spin_lock_irqsave(&ps_spinlock,flags);
}
if (!ps_ready || ps_ready() || (jiffies >= ps_timeout)) {
ps_continuation = NULL;
- spin_unlock_irqrestore(&ps_spinlock,flags);
+ spin_unlock_irqrestore(&ps_spinlock,flags);
con();
return;
}
}
static void ps_timer_int( unsigned long data)
-
-{ void (*con)(void);
- long flags;
+{
+ void (*con)(void);
+ long flags;
spin_lock_irqsave(&ps_spinlock,flags);
return;
}
ps_timer_active = 1;
- ps_timer.expires = jiffies + (ps_nice>0)?(ps_nice-1):0;
+ ps_timer.expires = jiffies + ((ps_nice>0)?(ps_nice-1):0);
add_timer(&ps_timer);
spin_unlock_irqrestore(&ps_spinlock,flags);
}
/* end of pseudo.h */
-
return;
}
-static struct super_operations ext2_sops = {
+static struct super_operations ext2_sops = {
ext2_read_inode,
NULL,
ext2_write_inode,
if (es->s_rev_level > EXT2_GOOD_OLD_REV) {
if (es->s_feature_incompat & ~EXT2_FEATURE_INCOMPAT_SUPP) {
printk("EXT2-fs: %s: couldn't mount because of "
- "unsupported optional features.\n",
+ "unsupported optional features.\n",
kdevname(dev));
goto failed_mount;
}
if (!(sb->s_flags & MS_RDONLY) &&
(es->s_feature_ro_compat & ~EXT2_FEATURE_RO_COMPAT_SUPP)) {
printk("EXT2-fs: %s: couldn't mount RDWR because of "
- "unsupported optional features.\n",
+ "unsupported optional features.\n",
kdevname(dev));
goto failed_mount;
}
}
sb->s_blocksize_bits = sb->u.ext2_sb.s_es->s_log_block_size + 10;
sb->s_blocksize = 1 << sb->s_blocksize_bits;
- if (sb->s_blocksize != BLOCK_SIZE &&
- (sb->s_blocksize == 1024 || sb->s_blocksize == 2048 ||
+ if (sb->s_blocksize != BLOCK_SIZE &&
+ (sb->s_blocksize == 1024 || sb->s_blocksize == 2048 ||
sb->s_blocksize == 4096)) {
unsigned long offset;
else {
/*
* Mounting a RDONLY partition read-write, so reread and
- * store the current valid flag. (It may have been changed
+ * store the current valid flag. (It may have been changed
* by e2fsck since we originally mounted the partition.)
*/
sb->u.ext2_sb.s_mount_state = es->s_state;