MCPcopy Index your code
hub / github.com/git/git / tloop_spawnwait_tasks

Function tloop_spawnwait_tasks

transport-helper.c:1537–1555  ·  view source on GitHub ↗

* Spawn the transfer tasks and then wait for them. Returns 0 on success, * -1 on failure. */

Source from the content-addressed store, hash-verified

1535 * -1 on failure.
1536 */
1537static int tloop_spawnwait_tasks(struct bidirectional_transfer_state *s)
1538{
1539 pthread_t gtp_thread;
1540 pthread_t ptg_thread;
1541 int err;
1542 int ret = 0;
1543 err = pthread_create(&gtp_thread, NULL, udt_copy_task_routine,
1544 &s->gtp);
1545 if (err)
1546 die(_("can't start thread for copying data: %s"), strerror(err));
1547 err = pthread_create(&ptg_thread, NULL, udt_copy_task_routine,
1548 &s->ptg);
1549 if (err)
1550 die(_("can't start thread for copying data: %s"), strerror(err));
1551
1552 ret |= tloop_join(gtp_thread, "Git to program copy");
1553 ret |= tloop_join(ptg_thread, "Program to git copy");
1554 return ret;
1555}
1556#else
1557
1558/* Close the source and target (for writing) for transfer. */

Callers 1

Calls 7

pthread_createFunction · 0.85
tloop_joinFunction · 0.85
forkFunction · 0.85
die_errnoFunction · 0.85
udt_kill_transferFunction · 0.85
udt_copy_task_routineFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected