How to split module?

Hi, all.

My question is about how to split one module into N modules(N >= 2)?
For example, given the following code:

#src.c#
int main()
{
    //......//
    func1();
    func2();
    //......//
    return 0;
}
void func1()
{
    //......//
}
void func2()
{
    //......//
}

func1() has no dependence with func2(), so they can perform parallel
execution. And I have to split src.c into src1.c and src2.c instead of using
thread library, because the target machine has multiple RISC processors
without Operating System,

#src1.c#
int main()
{
    //......//
    // synchronization
    func1();
    // synchronization
    //......//
    return 0;
}
void func1()
{
    //......//
}

#src2.c#
int main()
{
    //......//
    // synchronization
    func2();
    // synchronization
    //......//
    return 0;
}
void func2()
{
    //......//
}

Well, Assume the synchronization statements has been added, how to perform the
splitting on the orginal module wiht the guarantee of correctness. Thanks you!