git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
f25f2874ae1079bcdf923013be397de09ae3c8d9 blob 2314 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 
#ifndef PARALLEL_CHECKOUT_H
#define PARALLEL_CHECKOUT_H

#include "entry.h"
#include "convert.h"

/****************************************************************
 * Users of parallel checkout
 ****************************************************************/

enum pc_status {
	PC_UNINITIALIZED = 0,
	PC_ACCEPTING_ENTRIES,
	PC_RUNNING,
	PC_HANDLING_RESULTS,
};

enum pc_status parallel_checkout_status(void);
void init_parallel_checkout(void);

/*
 * Return -1 if parallel checkout is currently not enabled or if the entry is
 * not eligible for parallel checkout. Otherwise, enqueue the entry for later
 * write and return 0.
 */
int enqueue_checkout(struct cache_entry *ce, struct conv_attrs *ca);

/* Write all the queued entries, returning 0 on success. */
int run_parallel_checkout(struct checkout *state);

/****************************************************************
 * Interface with checkout--helper
 ****************************************************************/

enum ci_status {
	CI_PENDING = 0,
	CI_SUCCESS,
	CI_RETRY,
	CI_FAILED,
};

struct checkout_item {
	/*
	 * In main process ce points to a istate->cache[] entry. Thus, it's not
	 * owned by us. In workers they own the memory, which *must be* released.
	 */
	struct cache_entry *ce;
	struct conv_attrs ca;
	size_t id; /* position in parallel_checkout->items[] of main process */

	/* Output fields, sent from workers. */
	enum ci_status status;
	struct stat st;
};

/*
 * The fixed-size portion of `struct checkout_item` that is sent to the workers.
 * Following this will be 2 strings: ca.working_tree_encoding and ce.name; These
 * are NOT null terminated, since we have the size in the fixed portion.
 */
struct ci_fixed_portion {
	size_t id;
	struct object_id oid;
	unsigned int ce_mode;
	enum crlf_action attr_action;
	enum crlf_action crlf_action;
	int ident;
	size_t working_tree_encoding_len;
	size_t name_len;
};

/*
 * The `struct checkout_item` fields returned by the workers. The order is
 * important here, specially stat being the last one, as it is omitted on error.
 */
struct ci_result {
	size_t id;
	enum ci_status status;
	struct stat st;
};

#define ci_result_base_size() offsetof(struct ci_result, st)

void write_checkout_item(struct checkout *state, struct checkout_item *ci);

#endif /* PARALLEL_CHECKOUT_H */
debug log:

solving f25f2874ae ...
found f25f2874ae in https://public-inbox.org/git/7e7527ef3e8a9e71a012f1623e9642c47f7f741c.1597093021.git.matheus.bernardino@usp.br/
found 8eef59ffcd in https://public-inbox.org/git/1b39a4099a69f2c42211d46d615055c783703fea.1597093021.git.matheus.bernardino@usp.br/

applying [1/2] https://public-inbox.org/git/1b39a4099a69f2c42211d46d615055c783703fea.1597093021.git.matheus.bernardino@usp.br/
diff --git a/parallel-checkout.h b/parallel-checkout.h
new file mode 100644
index 0000000000..8eef59ffcd


applying [2/2] https://public-inbox.org/git/7e7527ef3e8a9e71a012f1623e9642c47f7f741c.1597093021.git.matheus.bernardino@usp.br/
diff --git a/parallel-checkout.h b/parallel-checkout.h
index 8eef59ffcd..f25f2874ae 100644

Checking patch parallel-checkout.h...
Applied patch parallel-checkout.h cleanly.
Checking patch parallel-checkout.h...
Applied patch parallel-checkout.h cleanly.

index at:
100644 f25f2874ae1079bcdf923013be397de09ae3c8d9	parallel-checkout.h

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).