The following is the experience of the little brother, if there is something wrong, please point out. I hope to communicate with everyone! ! !
Libtask directory
The original code is sorted in accordance with the principle that came first, thus establishing a queue of the task. The main program of the task queue is:
Taskcreate (Mainjumper, & Argc, 8192);
Schadinit ();
Where Mainjumper is a static method, calling the function taskmain (p [0], (char **) P [1]).
Process is: taskcreateà tinitstackà tosàtaskàsched
By gotolabel (& T-> SCHED); method to the specified location to run the TaskMain () function above.
P2PSIM directory
l Main file
The taskmain function is the program's entry function, which describes the function content of the program: Srandom () corresponds to the pseudo-random function inside Windows as: SRAND and RAND functions. The parsed parameters are passed through the ARG into the Node object. Singal system calls a new signal processing function to a signal.
The PARSE_ARGS function parsed the parameters that passed from the taskmain function. The Getopt in this function is used as parsing the command line and checks if it is legal. Finally, read the path of the file into the entire software.
l Node file inherits the OBServered class
Everyrase :: Parse Function Everyrase, Begin and Insert are all about Vertor's functions
l PaSE file contains only a function vector
l Topology file key is to resolve the topology file