[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Minios-devel] [UNIKRAFT PATCH 2/3] lib/ukboot: Modify ctor iteration to end at uk_ctortab_end
- To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
- From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
- Date: Tue, 27 Aug 2019 17:28:10 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A3UrE7zTPEECVPv5scxZF0FwQTKAETtxHZks0Wdbwjo=; b=DhrMChwFUTx64ygmYnkCPlgOZbETMJ2Ku4Gcxcn46/Nq8/dDddhg5khv/pDsFhzTb0gp+1zaidLXgfoFpBEL7k24wy62CMwDSDzPjQ5fbP9h7F5LS5GHS/X2AQSuEw2fJ2U6u9g3L0jlCRby8RTl48V2slZ3sFZnCtNSyNEK3YpmMyHvbUJaYGQmVh+Y2y1sOsMn3ogrIOfesPzmww4dB3xQSd/YETw8FwSWqgEJM8NPRBgVc4UJQYR+7LGoIFcXZ0jHibtpcAg0KtTvZWLpJMEXGVeq0DQzC/DDXg46dvWHLH9bFOBx/N/Euf2zDYcry1jnomqCA8+XZMCO0kUKKg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZabJ1lQIi3IqDYUgHXjWZ4NnUfJKSi/RjiBeZRJ7Q9T+XE18ac4izBwuzXyEwuK8ruvEi/41DPQsiEFyZK6v4mwLOr3PhpKcmuE1jOfcvAl13cLz4Q9lAN4jK7zVy+7gUHFmaPC04k29pHe47jlydfSY+vqFfgx8h2sTiFKNoouv0YaVkV5hpTCWziWrhSSDfPKQjdYoC/Q8WYpHRLtnYlzpeAvzc8H8VFYTTFNQkon1JV8jOq1UOCAJbh7g2wQDKhG+k1oBxTSzvyN1oTdsgwqr8//c5t2sb+Lme8s1BC1bEE25FL0YfNwooNcP1H2vxiwnbiLjTYS3mMMc3/dRGA==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
- Cc: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "sharan.santhanam@xxxxxxxxx" <sharan.santhanam@xxxxxxxxx>
- Delivery-date: Tue, 27 Aug 2019 17:28:21 +0000
- List-id: Mini-os development list <minios-devel.lists.xenproject.org>
- Thread-index: AQHVXPzMbiWMB8qSxUKvj0WzulKy5w==
- Thread-topic: [UNIKRAFT PATCH 2/3] lib/ukboot: Modify ctor iteration to end at uk_ctortab_end
The iteration thourgh the ctortab array of constructors now ends at
uk_ctortab_end.
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
include/uk/ctors.h | 1 +
lib/ukboot/boot.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uk/ctors.h b/include/uk/ctors.h
index a3432e2b..4223b338 100644
--- a/include/uk/ctors.h
+++ b/include/uk/ctors.h
@@ -45,6 +45,7 @@ extern "C" {
typedef void (*uk_ctor_func_t)(void);
extern const uk_ctor_func_t uk_ctortab[];
+extern const uk_ctor_func_t uk_ctortab_end[];
/*
* Register a constructor function that is
diff --git a/lib/ukboot/boot.c b/lib/ukboot/boot.c
index 9738a912..935123c7 100644
--- a/lib/ukboot/boot.c
+++ b/lib/ukboot/boot.c
@@ -182,7 +182,7 @@ void ukplat_entry(int argc, char *argv[])
#endif
uk_pr_info("Unikraft constructors table at %p\n", uk_ctortab);
- for (cfn = uk_ctortab; *cfn != NULL; ++cfn) {
+ for (cfn = uk_ctortab; cfn != &uk_ctortab_end; ++cfn) {
uk_pr_debug("Call constructor %p\n", *cfn);
(*cfn)();
}
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|