1
1

event: plug a leak when closing the event framework

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2016-10-03 16:47:26 +09:00
родитель b3a2bdda7b
Коммит 6d5cb9fe0d
5 изменённых файлов: 45 добавлений и 9 удалений

Просмотреть файл

@ -1,6 +1,8 @@
/*
* Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -54,13 +56,6 @@ MCA_BASE_FRAMEWORK_DECLARE(opal, event, NULL, NULL, opal_event_base_open,
opal_event_base_close, mca_event_base_static_components,
0);
static int opal_event_base_close(void)
{
/* cleanup components even though they are statically opened */
return mca_base_framework_components_close (&opal_event_base_framework,
NULL);
}
/*
* Globals
*/
@ -95,3 +90,21 @@ static int opal_event_base_open(mca_base_open_flag_t flags)
return rc;
}
static int opal_event_base_close(void)
{
int rc;
/* cleanup components even though they are statically opened */
if (OPAL_SUCCESS != (rc =mca_base_framework_components_close (&opal_event_base_framework,
NULL))) {
return rc;
}
opal_event_base_free(opal_sync_event_base);
/* finalize the lib */
return opal_event_finalize();
}

Просмотреть файл

@ -4,6 +4,8 @@
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
*/
#include "opal_config.h"
#include "opal/constants.h"
@ -21,6 +23,11 @@ int opal_event_init(void)
return OPAL_SUCCESS;
}
int opal_event_finalize(void)
{
return OPAL_SUCCESS;
}
opal_event_t* opal_event_alloc(void)
{
opal_event_t *ev;

4
opal/mca/event/external/external.h поставляемый
Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
*
* $COPYRIGHT$
@ -51,6 +51,8 @@ OPAL_DECLSPEC extern opal_event_base_t *opal_sync_event_base;
OPAL_DECLSPEC int opal_event_init(void);
OPAL_DECLSPEC int opal_event_finalize(void);
#define opal_event_reinit(b) event_reinit((b))
#define opal_event_base_init_common_timeout (b, t) event_base_init_common_timeout((b), (t))

Просмотреть файл

@ -4,7 +4,8 @@
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
*
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -86,6 +87,8 @@ OPAL_DECLSPEC opal_event_base_t* opal_event_base_create(void);
OPAL_DECLSPEC int opal_event_init(void);
OPAL_DECLSPEC int opal_event_finalize(void);
#define opal_event_reinit(b) event_reinit((b))
#define opal_event_base_init_common_timeout (b, t) event_base_init_common_timeout((b), (t))

Просмотреть файл

@ -5,6 +5,11 @@
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*/
#include "opal_config.h"
#include "opal/constants.h"
@ -118,6 +123,12 @@ int opal_event_init(void)
return OPAL_SUCCESS;
}
int opal_event_finalize(void)
{
event_config_free(config);
return OPAL_SUCCESS;
}
opal_event_t* opal_event_alloc(void)
{
opal_event_t *ev;