aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scheduler.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-10-20 09:43:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-10-26 13:29:24 +0200
commitf264a2e81ef9ce80c302757c5900b55d9140af2b (patch)
treea45de123f3741d2def02fbf304c0b67f32a69874 /libbuild2/scheduler.hxx
parent4d34633cfbd3936cb4d20545b48a031ba011db4c (diff)
WIP: drag options up the stack
Diffstat (limited to 'libbuild2/scheduler.hxx')
-rw-r--r--libbuild2/scheduler.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/scheduler.hxx b/libbuild2/scheduler.hxx
index dcddfcc..d3b8ceb 100644
--- a/libbuild2/scheduler.hxx
+++ b/libbuild2/scheduler.hxx
@@ -555,8 +555,8 @@ namespace build2
atomic_count* task_count;
size_t start_count;
- func_type func;
args_type args;
+ func_type func;
template <size_t... i>
void
@@ -685,7 +685,11 @@ namespace build2
//
struct task_data
{
- alignas (std::max_align_t) unsigned char data[sizeof (void*) * 8];
+ static const size_t data_size = (sizeof (void*) == 4
+ ? sizeof (void*) * 16
+ : sizeof (void*) * 8);
+
+ alignas (std::max_align_t) unsigned char data[data_size];
void (*thunk) (scheduler&, lock&, void*);
};