Print loaded files and errors, enable loading and searching
This commit is contained in:
@@ -401,9 +401,9 @@ struct Array {
|
||||
}
|
||||
|
||||
void bounded_add(T item) {
|
||||
Assert(len + 1 <= cap);
|
||||
try_growing(); // in case of error
|
||||
data[len++] = item;
|
||||
if (len + 1 <= cap) {
|
||||
data[len++] = item;
|
||||
}
|
||||
}
|
||||
|
||||
T *alloc(const T &item) {
|
||||
|
||||
@@ -11,6 +11,7 @@ struct ThreadCtx {
|
||||
};
|
||||
|
||||
struct WorkQueue {
|
||||
int32_t thread_count;
|
||||
WorkQueueEntry entries[256];
|
||||
int64_t volatile index_to_write;
|
||||
int64_t volatile index_to_read;
|
||||
@@ -27,4 +28,6 @@ struct ThreadStartupInfo {
|
||||
|
||||
void PushWork(WorkQueue *wq, void *data, WorkQueueCallback *callback);
|
||||
void InitWorkQueue(WorkQueue *queue, uint32_t thread_count, ThreadStartupInfo *info);
|
||||
void WaitUntilCompletion(WorkQueue *wq);
|
||||
void WaitUntilCompletion(WorkQueue *wq);
|
||||
|
||||
int64_t AtomicIncrement(volatile int64_t *i);
|
||||
@@ -51,6 +51,7 @@ DWORD WINAPI WorkQueueThreadEntry(LPVOID param) {
|
||||
}
|
||||
|
||||
void InitWorkQueue(WorkQueue *queue, uint32_t thread_count, ThreadStartupInfo *info) {
|
||||
queue->thread_count = thread_count;
|
||||
queue->index_to_read = 0;
|
||||
queue->index_to_write = 0;
|
||||
queue->completion_index = 0;
|
||||
|
||||
Reference in New Issue
Block a user