Changeset 72cf064 in mainline for uspace/app/trace/trace.c


Ignore:
Timestamp:
2012-08-13T17:17:04Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33fee91
Parents:
f4a8734 (diff), 4820360 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/trace.c

    rf4a8734 r72cf064  
    318318}
    319319
    320 static void sc_ipc_call_sync_fast(sysarg_t *sc_args)
    321 {
    322         ipc_call_t question, reply;
    323         int rc;
    324         int phoneid;
    325 
    326         phoneid = sc_args[0];
    327 
    328         IPC_SET_IMETHOD(question, sc_args[1]);
    329         IPC_SET_ARG1(question, sc_args[2]);
    330         IPC_SET_ARG2(question, sc_args[3]);
    331         IPC_SET_ARG3(question, sc_args[4]);
    332         IPC_SET_ARG4(question, 0);
    333         IPC_SET_ARG5(question, 0);
    334 
    335         memset(&reply, 0, sizeof(reply));
    336         rc = udebug_mem_read(sess, &reply.args, sc_args[5], sizeof(reply.args));
    337         if (rc < 0)
    338                 return;
    339        
    340         ipcp_call_sync(phoneid, &question, &reply);
    341 }
    342 
    343 static void sc_ipc_call_sync_slow_b(unsigned thread_id, sysarg_t *sc_args)
    344 {
    345         ipc_call_t question;
    346         int rc;
    347 
    348         memset(&question, 0, sizeof(question));
    349         rc = udebug_mem_read(sess, &question.args, sc_args[1],
    350             sizeof(question.args));
    351 
    352         if (rc < 0) {
    353                 printf("Error: mem_read->%d\n", rc);
    354                 return;
    355         }
    356 
    357         thread_ipc_req[thread_id] = question;
    358 }
    359 
    360 static void sc_ipc_call_sync_slow_e(unsigned thread_id, sysarg_t *sc_args)
    361 {
    362         ipc_call_t reply;
    363         int rc;
    364 
    365         memset(&reply, 0, sizeof(reply));
    366         rc = udebug_mem_read(sess, &reply.args, sc_args[2],
    367             sizeof(reply.args));
    368 
    369         if (rc < 0) {
    370                 printf("Error: mem_read->%d\n", rc);
    371                 return;
    372         }
    373 
    374         ipcp_call_sync(sc_args[0], &thread_ipc_req[thread_id], &reply);
    375 }
    376 
    377320static void sc_ipc_wait(sysarg_t *sc_args, int sc_rc)
    378321{
     
    408351                print_sc_args(sc_args, syscall_desc[sc_id].n_args);
    409352        }
    410 
    411         switch (sc_id) {
    412         case SYS_IPC_CALL_SYNC_SLOW:
    413                 sc_ipc_call_sync_slow_b(thread_id, sc_args);
    414                 break;
    415         default:
    416                 break;
    417         }
    418353}
    419354
     
    447382        case SYS_IPC_CALL_ASYNC_SLOW:
    448383                sc_ipc_call_async_slow(sc_args, sc_rc);
    449                 break;
    450         case SYS_IPC_CALL_SYNC_FAST:
    451                 sc_ipc_call_sync_fast(sc_args);
    452                 break;
    453         case SYS_IPC_CALL_SYNC_SLOW:
    454                 sc_ipc_call_sync_slow_e(thread_id, sc_args);
    455384                break;
    456385        case SYS_IPC_WAIT:
Note: See TracChangeset for help on using the changeset viewer.