How to perform sine generation (in C)?
I think your recalculation of phis in the function is not correct.

If I do this in scilab:

//25631
N = 100;
phis1=162*%pi/180;//initial phase of signal

[data1,phis2] = rc(N,phis1);
[data2,phis3] = rc(N,phis2);
[data3,phis4] = rc(N,phis3);

clf
plot([data1 data2 data3])


where rc is 

//////////////////////////////////////////////////////////////////////// 
//  generates a sinusoid of dwLength in dwData 
//      and maintains phis value updated
////////////////////////////////////////////////////////////////////////
function [dwDataOut,phis] = rc(dwLength, phis)
omegaf=50/dwLength/%pi*90/100;

dwDataOut = zeros(1,dwLength);

for dwi=1:dwLength,
    dwDataOut(dwi) = 4450*sin(dwi*omegaf+phis)+200;
end

//update wave phase
//WAS: phis = phis - %pi*(1-50/dwLength)+%pi/2;
phis = dwLength*omegaf+phis;
while(phis&lt;0)
    phis = phis + 2*%pi;
end
endfunction


Note specifically the line phis = dwLength*omegaf+phis;

Then the plot is as below, which seems to be what you're after.