read: Resource temporarily unavailable

I have two qnx systems running. I am trying to test throughput on a serial
line. One systems is basically doing, while(1){
} and and sendmessage calls write() which will write one
character at a time. Now the other system will read as much as it can for 1
sec and all it really does it keep track of the number of bits it has read
in and number of full messages it recieves.
msg_len = read(fd, &rec_c, 1)
if(msg_len < 0)
switch (state)
case STX:
if( ch = STX)
state = ETX

Now the only problem is I am reading most of the data, yet towards the end
of that particular time interval I am getting an error originating from the
read operation saying that the resource is unavailabe. Could this be
overflowing the serial buffer?