P2PSIM detailed

xiaoxiao2021-03-06  37

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 split (String Line, String Delims). This function returns the multi-vector amount obtained by dividing LINE by Delims. String is a template class Basic_String under the Windows environment, but the original method is very parameter. In the middle of the actual use, use String directly, because there is such a definition: typedef Basic_String string;

l Topology file key is to resolve the topology file

转载请注明原文地址:https://www.9cbs.com/read-67768.html

New Post(0)