I think the Serial class is the intellectual property of Arduino software. It's not an open source software . I don't think it's a easy thing to figure out the workflow without source code.
If you are interested in the workflow of functions or the operating principle of Arduino software, it's better to consult the Arduino official.
For the serial port of Arduino IDE ,I think this page can explain it , Arduino - Serial.
At last, I think you post the thread in a wrong place. You should post this question here: Forum: Galileo | Intel Communitiese . There are more experts can help you to handle your question about Galileo.