[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH] include/uk: Remove <ctors_prio.h> header



This reverts commit d56a47c2d123c5e46c35d759be1b7dd9bc90b093 and
removes <uk/ctors_prio.h>.
The intention of the author was that constructors of Unikraft system
libraries use the definitions in this header to coordinate the order
of initialization. However, constructors defined with the constructor
attribute end up in the init_array and preinit_array. We learned from
recent porting works, that these tables need to be treated as being
application-specific and should not be used for Unikraft system
components. System libraries (e.g., vfscore) need to be initialized
earlier because the application may depend on them. The problem is
that our priority levels are possibly in conflict with the application
ones. For this purpose, we recently introduced uk_ctortab and
uk_inittab. Those tables are handled before the application constructors
and are intended for initializing Unikraft system components.

So far, only one external library used the scheme that is reverted
with this patch: pthread-embedded. Another patch is sent out to adopt
this library to the uk_inittab, uk_ctortab scheme.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>>
---
 include/uk/ctors_prio.h | 65 -----------------------------------------
 1 file changed, 65 deletions(-)
 delete mode 100644 include/uk/ctors_prio.h

diff --git a/include/uk/ctors_prio.h b/include/uk/ctors_prio.h
deleted file mode 100644
index 5ce9c95d..00000000
--- a/include/uk/ctors_prio.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Authors: Costin Lupu <costin.lupu@xxxxxxxxx>
- *
- * Copyright (c) 2019, University Politehnica of Bucharest. All rights 
reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
- *    contributors may be used to endorse or promote products derived from
- *    this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
- */
-
-#ifndef __UK_CTORS__PRIO_H__
-#define __UK_CTORS__PRIO_H__
-
-#include <uk/essentials.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __GNUC__
-
-/* Constructor attribute */
-#define UK_CTOR_ATTR(value)   __attribute__((constructor(value)))
-
-
-/*
- * Constructors priority values
- */
-#define UK_CTOR_PRIO_PTHREAD_EMBEDDED              101
-
-
-
-#else
-#error "Please define constructor priorities for your compiler!"
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __UK_CTORS__PRIO_H__ */
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.