Changes between Version 4 and Version 5 of ppc_prog_overview/xilkernel


Ignore:
Timestamp:
Mar 14, 2007, 1:31:07 AM (17 years ago)
Author:
snovich
Comment:

Extended an intro on the threading concept

Legend:

Unmodified
Added
Removed
Modified
  • ppc_prog_overview/xilkernel

    v4 v5  
    1717
    1818== Threading ==
     19
     20A thread, in xilkernel, is simply a function that is not necessarily processed linearly. If you are a beginner programmer, you may be used to the idea of a linear program, where at any given time, you are sitting in one function call. This is not necessarily the case with threads. Threads are coded like functions, but can work "in parallel" -- not truely in parallel, however, unless you have multiple processors. In a single processor, parts of the function/thread are processed in a scheduled fashion, very quickly -- giving the the ''impression'' that they are being processed in parallel in realtime. Aside from being simple functions, threads can do a lot of cool things, like interact with each other and pass data back and forth. By reading the rest of this document and checking out the [http://warp.rice.edu/trac/wiki/xilkernel_ref reference designs], you should be able to pick up (relatively easily), how to do all of these things.
    1921
    2022Threading is a required component of Xilkernel – at least one thread is required to spawn from the system at kernel start. The main threads are simply functions of type void* and do not take any inputs. The launch threads are defined in SPS under the “'''OS and Libraries Tab''',” under the “'''config_pthread_support'''” header, and finally in the “'''static_pthread_table'''.” A priority level may be given to the thread if priority-scheduling is used in the system – otherwise it will be ignored.[[BR]][[BR]]