Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 985
b: refs/heads/master
c: da998a2
h: refs/heads/master
i:
  983: 3388b44
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed May 5, 2005
1 parent 97c9787 commit 8116ffa
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 89 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b8b611e9a4725ae558af4fa48cf7d9e2193e7ed
refs/heads/master: da998a2aecd3f15eca5385e1122610890039c4df
2 changes: 1 addition & 1 deletion trunk/arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $(ARCH_DIR)/util/mk_task $(ARCH_DIR)/util/mk_constants: $(ARCH_DIR)/include/user

$(ARCH_DIR)/kernel/skas/util/mk_ptregs: $(ARCH_DIR)/kernel/skas/util FORCE ;

$(ARCH_DIR)/util: scripts_basic $(SYS_DIR)/sc.h FORCE
$(ARCH_DIR)/util: scripts_basic $(SYS_DIR)/sc.h $(ARCH_DIR)/kernel-offsets.h FORCE
$(Q)$(MAKE) $(build)=$@

$(ARCH_DIR)/kernel/skas/util: scripts_basic $(ARCH_DIR)/user-offsets.h FORCE
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/um/util/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
hostprogs-y := mk_task mk_constants
always := $(hostprogs-y)

mk_task-objs := mk_task_user.o mk_task_kern.o
mk_constants-objs := mk_constants_user.o mk_constants_kern.o

HOSTCFLAGS_mk_task_kern.o := $(CFLAGS) $(CPPFLAGS)
HOSTCFLAGS_mk_constants_kern.o := $(CFLAGS) $(CPPFLAGS)
HOSTCFLAGS_mk_task.o := -I$(objtree)/arch/um
HOSTCFLAGS_mk_constants.o := -I$(objtree)/arch/um
32 changes: 32 additions & 0 deletions trunk/arch/um/util/mk_constants.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <stdio.h>
#include <kernel-offsets.h>

#define SHOW_INT(sym) printf("#define %s %d\n", #sym, sym)
#define SHOW_STR(sym) printf("#define %s %s\n", #sym, sym)

int main(int argc, char **argv)
{
printf("/*\n");
printf(" * Generated by mk_constants\n");
printf(" */\n");
printf("\n");
printf("#ifndef __UM_CONSTANTS_H\n");
printf("#define __UM_CONSTANTS_H\n");
printf("\n");

SHOW_INT(UM_KERN_PAGE_SIZE);

SHOW_STR(UM_KERN_EMERG);
SHOW_STR(UM_KERN_ALERT);
SHOW_STR(UM_KERN_CRIT);
SHOW_STR(UM_KERN_ERR);
SHOW_STR(UM_KERN_WARNING);
SHOW_STR(UM_KERN_NOTICE);
SHOW_STR(UM_KERN_INFO);
SHOW_STR(UM_KERN_DEBUG);

SHOW_INT(UM_NSEC_PER_SEC);
printf("\n");
printf("#endif\n");
return(0);
}
28 changes: 0 additions & 28 deletions trunk/arch/um/util/mk_constants_kern.c

This file was deleted.

28 changes: 0 additions & 28 deletions trunk/arch/um/util/mk_constants_user.c

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#include <stdio.h>
#include <kernel-offsets.h>

void print(char *name, char *type, int offset)
void print_ptr(char *name, char *type, int offset)
{
printf("#define %s(task) *((%s *) &(((char *) (task))[%d]))\n", name, type,
printf("#define %s(task) ((%s *) &(((char *) (task))[%d]))\n", name, type,
offset);
}

void print_ptr(char *name, char *type, int offset)
void print(char *name, char *type, int offset)
{
printf("#define %s(task) ((%s *) &(((char *) (task))[%d]))\n", name, type,
printf("#define %s(task) *((%s *) &(((char *) (task))[%d]))\n", name, type,
offset);
}

void print_head(void)
int main(int argc, char **argv)
{
printf("/*\n");
printf(" * Generated by mk_task\n");
Expand All @@ -21,10 +22,9 @@ void print_head(void)
printf("#ifndef __TASK_H\n");
printf("#define __TASK_H\n");
printf("\n");
}

void print_tail(void)
{
print_ptr("TASK_REGS", "union uml_pt_regs", TASK_REGS);
print("TASK_PID", "int", TASK_PID);
printf("\n");
printf("#endif\n");
return(0);
}
17 changes: 0 additions & 17 deletions trunk/arch/um/util/mk_task_kern.c

This file was deleted.

0 comments on commit 8116ffa

Please sign in to comment.