Reorganized typedefs to avoid compiler warnings.

Details:
- Relocated membrk_t definition from bli_membrk.h to bli_type_defs.h.
- Moved #include of bli_malloc.h from blis.h to bli_type_defs.h.
- Removed standalone mtx_t and mutex_t typedefs in bli_type_defs.h.
- Moved #include of bli_mutex.h from bli_thread.h to bli_typedefs.h.
- The redundant typedefs of membrk_t and mtx_t caused a warning on some C
  compilers. Thanks to Tyler Smith for reporting this issue.
This commit is contained in:
Field G. Van Zee
2016-10-19 15:58:03 -05:00
parent 28b2af8a71
commit 970745a5fc
4 changed files with 6 additions and 21 deletions

View File

@@ -36,16 +36,6 @@
#ifndef BLIS_MEMBRK_H
#define BLIS_MEMBRK_H
// -- Memory broker object type --
typedef struct membrk_s
{
pool_t pools[3];
mtx_t mutex;
malloc_ft malloc_fp;
free_ft free_fp;
} membrk_t;
#define bli_membrk_pool( pool_index, membrk_p ) \
\

View File

@@ -715,10 +715,6 @@ typedef enum
// -- BLIS misc. structure types -----------------------------------------------
//
// -- Mutex type --
typedef struct mtx_s mtx_t;
// -- Pool block type --
typedef struct
@@ -741,10 +737,14 @@ typedef struct
siz_t align_size;
} pool_t;
// -- Mutex object type --
#include "bli_mutex.h"
#include "bli_malloc.h"
// -- Memory broker object type --
typedef struct membrk_s membrk_t;
/*
typedef struct membrk_s
{
pool_t pools[3];
mtx_t mutex;
@@ -752,7 +752,6 @@ typedef struct membrk_s membrk_t;
malloc_ft malloc_fp;
free_ft free_fp;
} membrk_t;
*/
// -- Memory object type --

View File

@@ -98,7 +98,6 @@ extern "C" {
#include "bli_init.h"
#include "bli_const.h"
#include "bli_malloc.h"
#include "bli_obj.h"
#include "bli_obj_scalar.h"
#include "bli_cntx.h"

View File

@@ -52,9 +52,6 @@
#define BLIS_ENABLE_MULTITHREADING
#endif
// Include thread mutex (mtx_t) object definitions and prototypes.
#include "bli_mutex.h"
// Include thread communicator (thrcomm_t) object definitions and prototypes.
#include "bli_thrcomm.h"