-
- xbt_mutex_t mut=smpi_process_mailboxes_mutex();
- xbt_mutex_acquire(mut);
-
- if (request->flags & RMA || request->size < sg_cfg_get_int("smpi/async_small_thres")){
+
+ int async_small_thres = sg_cfg_get_int("smpi/async_small_thres");
+
+ xbt_mutex_t mut = smpi_process_mailboxes_mutex();
+ if (async_small_thres != 0 ||request->flags & RMA)
+ xbt_mutex_acquire(mut);
+
+ if (async_small_thres == 0 && !(request->flags & RMA)) {
+ mailbox = smpi_process_mailbox();
+ }
+ else if (request->flags & RMA || request->size < async_small_thres){