summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-08 12:37:17 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-08 12:37:17 +0000
commit9aa9eb41942b918f385ccabd2efdd6e7e4232165 (patch)
tree20bec7da036d31ec185dfc1dcc00753c7ac9b170 /include/linux
parent87075e049581f880f01eb0b41aa6ac807b299e35 (diff)
Merge with Linux 2.4.0-test6-pre1.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/arcdevice.h2
-rw-r--r--include/linux/binfmts.h5
-rw-r--r--include/linux/module.h5
-rw-r--r--include/linux/sched.h25
-rw-r--r--include/linux/spinlock.h1
5 files changed, 31 insertions, 7 deletions
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h
index 63edac9d6..dd88e8a80 100644
--- a/include/linux/arcdevice.h
+++ b/include/linux/arcdevice.h
@@ -76,7 +76,7 @@
#define D_TIMING 4096 /* show time needed to copy buffers to card */
#ifndef ARCNET_DEBUG_MAX
-#define ARCNET_DEBUG_MAX (~0) /* enable ALL debug messages */
+#define ARCNET_DEBUG_MAX (127) /* change to ~0 if you want detailed debugging */
#endif
#ifndef ARCNET_DEBUG
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 0644ae74c..062e310ee 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -11,13 +11,16 @@
*/
#define MAX_ARG_PAGES 32
+/* sizeof(linux_binprm->buf) */
+#define BINPRM_BUF_SIZE 128
+
#ifdef __KERNEL__
/*
* This structure is used to hold the arguments that are used when loading binaries.
*/
struct linux_binprm{
- char buf[128];
+ char buf[BINPRM_BUF_SIZE];
struct page *page[MAX_ARG_PAGES];
unsigned long p; /* current top of mem */
int sh_bang;
diff --git a/include/linux/module.h b/include/linux/module.h
index a561f805f..fef8d2b20 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -143,8 +143,13 @@ struct module_info
#define __MODULE_STRING(x) __MODULE_STRING_1(x)
/* Find a symbol exported by the kernel or another module */
+#ifdef CONFIG_MODULES
extern unsigned long get_module_symbol(char *, char *);
extern void put_module_symbol(unsigned long);
+#else
+static inline unsigned long get_module_symbol(char *unused1, char *unused2) { return 0; };
+static inline void put_module_symbol(unsigned long unused) { };
+#endif
extern int try_inc_mod_count(struct module *mod);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6b82d6977..d6daffe8d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -243,10 +243,24 @@ struct signal_struct {
/*
* Some day this will be a full-fledged user tracking system..
- * Right now it is only used to track how many processes a
- * user has, but it has the potential to track memory usage etc.
*/
-struct user_struct;
+struct user_struct {
+ atomic_t __count; /* reference count */
+ atomic_t processes; /* How many processes does this user have? */
+ atomic_t files; /* How many open files does this user have? */
+
+ /* Hash table maintenance information */
+ struct user_struct *next, **pprev;
+ unsigned int uid;
+};
+
+#define get_current_user() ({ \
+ struct user_struct *__user = current->user; \
+ atomic_inc(&__user->__count); \
+ __user; })
+
+extern struct user_struct root_user;
+#define INIT_USER (&root_user)
struct task_struct {
/*
@@ -427,6 +441,7 @@ struct task_struct {
cap_permitted: CAP_FULL_SET, \
keep_capabilities: 0, \
rlim: INIT_RLIMITS, \
+ user: INIT_USER, \
comm: "swapper", \
thread: INIT_THREAD, \
fs: &init_fs, \
@@ -489,8 +504,8 @@ static inline struct task_struct *find_task_by_pid(int pid)
}
/* per-UID process charging. */
-extern int alloc_uid(struct task_struct *);
-void free_uid(struct task_struct *);
+extern struct user_struct * alloc_uid(uid_t);
+extern void free_uid(struct user_struct *);
#include <asm/current.h>
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 86fce1e7d..8ba581f5b 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -118,6 +118,7 @@ typedef struct {
#define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
#endif
+#define rwlock_init(lock) do { } while(0)
#define read_lock(lock) (void)(lock) /* Not "unused variable". */
#define read_unlock(lock) do { } while(0)
#define write_lock(lock) (void)(lock) /* Not "unused variable". */