Results 1 to 6 of 6

Thread: Please I need Help....

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    58

    Please I need Help....

    Hello guys... can u tell me what language this is n how can i compile this???

    VB Code:
    1. /*
    2.  *  linux/kernel/fork.c
    3.  *
    4.  *  Copyright (C) 1991, 1992  Linus Torvalds
    5.  */
    6.  
    7. /*
    8.  *  'fork.c' contains the help-routines for the 'fork' system call
    9.  * (see also entry.S and others).
    10.  * Fork is rather simple, once you get the hang of it, but the memory
    11.  * management can be a *****. See 'mm/memory.c': 'copy_page_range()'
    12.  */
    13.  
    14. #include <linux/config.h>
    15. #include <linux/slab.h>
    16. #include <linux/init.h>
    17. #include <linux/unistd.h>
    18. #include <linux/smp_lock.h>
    19. #include <linux/module.h>
    20. #include <linux/vmalloc.h>
    21. #include <linux/completion.h>
    22. #include <linux/namespace.h>
    23. #include <linux/personality.h>
    24. #include <linux/file.h>
    25. #include <linux/binfmts.h>
    26. #include <linux/mman.h>
    27. #include <linux/fs.h>
    28. #include <linux/security.h>
    29. #include <linux/jiffies.h>
    30. #include <linux/futex.h>
    31. #include <linux/ptrace.h>
    32. #include <linux/mount.h>
    33.  
    34. #include <asm/pgtable.h>
    35. #include <asm/pgalloc.h>
    36. #include <asm/uaccess.h>
    37. #include <asm/mmu_context.h>
    38. #include <asm/cacheflush.h>
    39. #include <asm/tlbflush.h>
    40.  
    41. extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
    42. extern void exit_sem(struct task_struct *tsk);
    43.  
    44. /* The idle threads do not count..
    45.  * Protected by write_lock_irq(&tasklist_lock)
    46.  */
    47. int nr_threads;
    48.  
    49. int max_threads;
    50. unsigned long total_forks;  /* Handle normal Linux uptimes. */
    51.  
    52. DEFINE_PER_CPU(unsigned long, process_counts) = 0;
    53.  
    54. rwlock_t tasklist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;  /* outer */
    55.  
    56. EXPORT_SYMBOL(tasklist_lock);
    57.  
    58. int nr_processes(void)
    59. {
    60.     int cpu;
    61.     int total = 0;
    62.  
    63.     for (cpu = 0; cpu < NR_CPUS; cpu++) {
    64.         if (cpu_online(cpu))
    65.             total += per_cpu(process_counts, cpu);
    66.     }
    67.     return total;
    68. }
    69.  
    70. #ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
    71. # define alloc_task_struct()    kmem_cache_alloc(task_struct_cachep, GFP_KERNEL)
    72. # define free_task_struct(tsk)  kmem_cache_free(task_struct_cachep, (tsk))
    73. static kmem_cache_t *task_struct_cachep;
    74. #endif
    75.  
    76. static void free_task(struct task_struct *tsk)
    77. {
    78.     free_thread_info(tsk->thread_info);
    79.     free_task_struct(tsk);
    80. }
    81.  
    82. void __put_task_struct(struct task_struct *tsk)
    83. {
    84.     WARN_ON(!(tsk->state & (TASK_DEAD | TASK_ZOMBIE)));
    85.     WARN_ON(atomic_read(&tsk->usage));
    86.     WARN_ON(tsk == current);
    87.  
    88. ...........
    89. ............................
    90. ..........................................


    Can i compile this on vb.net or vb 6 ??
    can i compile this on WINDOWS??


    Please guys

    Thanks a lot

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Please I need Help....

    Quote Originally Posted by roubesh14
    Can i compile this on vb.net or vb6
    No. Only programs written in VB.NET can be compiled with VB.NET and only programs written in VB6 can be compiled in VB6. This is neither.

    This was written in C so in order to compile it you would need to use a C Compiler.

  3. #3

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    58

    Re: Please I need Help....

    But if i get a compiler will i b able to compile it on windows?

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Please I need Help....

    No. This is part of the Linux kernel and most definitely cannot be compiled under Windows. (Or at least for Windows. You might be able to find a cross-compiler, but that doesn't help you any.)

    What do you need it for?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    58

    Re: Please I need Help....

    A friend is asking me for help for his assisnment n i dont have any idea about linux programming.....ive downloaded realbasic do u think it will work?

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Please I need Help....

    No. Basic and C are totally different languages.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width