How can i create a critical section?

Hi,all_

   I used Q24PL002 and OPENAT 3.20. I want to get a GPS information from UART2 and send the decoded GPS information to server by GPRS. because the FCM process (UART2) and the send process(GPRS) operate the buffer concurrently. if one process is operating  the buffer and then another process interrupt it,the buffer will store  error data.so I have a question.  How can i create a critical section to opeate the buffer?
 
   thanks and Best Regards!
  Jack

An Open-AT 3.2 application has only a single thread - so your application’s GPRS handling can’t interrupt your application’s FCM handling.

thanks for your reply!

 If I am sending  data by timer process( I mean that I  subscribe a  timer and send the data in this process), Can the FCM handler interrupt the process? 

thanks and Best Regards!

 Jack