Changing sched.h value (2.6 kernel)
Results 1 to 4 of 4

Thread: Changing sched.h value (2.6 kernel)

  1. #1
    Member
    Join Date
    Sep 2003
    Posts
    76

    Changing sched.h value (2.6 kernel)

    We are working on a OS project were we are modifying the scheduler for the liux kernel 2.6. Anyways we want to make this changes dinamically (changes will prioritize CPU bound or I/O bount processes).
    We have a modified version of sched.h which in theory does what we want.
    I need to change some values in our version of sched.h dinamically. I think I can to this writing a kernel module (maybe im wrong) but dont know how to do it. It two simple variables in sched.h that we added what I want to change. Any help, im pretty lost right now . Thanks in advance
    I Speak in frequencies even dogs have trouble hearing


  2. #2
    Member
    Join Date
    Sep 2003
    Posts
    76
    Well guess nobody who has done something like that has seen this but just in case another question, is there an easier way to compile a module besides doing a makefile?? I was using kdevelop and thought if i started a new project as a "module project" he would take care of compiling it correctly.....I was wrong
    I Speak in frequencies even dogs have trouble hearing


  3. #3
    Senior Member
    Join Date
    Jun 2002
    Posts
    394
    Originally posted here by Q-bel
    Well guess nobody who has done something like that has seen this but just in case another question, is there an easier way to compile a module besides doing a makefile?? I was using kdevelop and thought if i started a new project as a "module project" he would take care of compiling it correctly.....I was wrong
    you could probably use autotools, automake in particular. you have to write a Makefile.am file. but it is easier. run automake, which will then generate the Makefile for you. then just make.


    Code:
    #sample Makefile.am (not tested)
    #
    # compiles and links test.c and objs and libs specified by test_LDADD into bin file called test, also looks for makefiles in two subdirs
    #
    
    noinst_PROGRAMS = test
    
    test_SOURCES = test.c
    
    test_LDADD = ./subdir/ObjFile.o ./subdir2/anotherObjFile.o -lGL -lfaad
    
    SUBDIRS = subdir subdir2

    though, if you are building modules instead of bins you probably want something like:


    Code:
    libtest_a_SOURCES = test.c
    noinst_LIBRARIES = libtest.a
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

  4. #4
    Senior Member
    Join Date
    Jun 2002
    Posts
    394
    also you could do it from the command line, or by creating a file with contents like below, then execute the file. It's probably not a problem to use this method until you have a large project on your hands, then use autotools or some other build system.

    Code:
    gcc -shared -Wl,-soname,your_soname \
        -o library_name file_list library_list
    
    
    gcc -fPIC -g -c -Wall a.c
    gcc -fPIC -g -c -Wall b.c
    gcc -shared -Wl,-soname,libmystuff.so.1 -o libmystuff.so.1.0.1 a.o b.o -lc
    examples taken from David A. Wheeler, Program Library HOWTO (2003) at http://www.tldp.org/HOWTO/Program-Li...WTO/index.html
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •