Browse Source

misc: don't violate reserved identifier naming convention.

Closes https://github.com/veox/sgminer/issues/177
refactor
Noel Maersk 11 years ago
parent
commit
cc735db550
  1. 13
      adl.h
  2. 6
      compat.h
  3. 6
      driver-opencl.h
  4. 8
      findnonce.h
  5. 6
      logging.h
  6. 6
      miner.h
  7. 7
      ocl.h
  8. 6
      util.h

13
adl.h

@ -1,5 +1,6 @@
#ifndef __ADL_H__ #ifndef ADL_H
#define __ADL_H__ #define ADL_H
#ifdef HAVE_ADL #ifdef HAVE_ADL
extern bool adl_active; extern bool adl_active;
extern bool opt_reorder; extern bool opt_reorder;
@ -19,10 +20,14 @@ bool gpu_stats(int gpu, float *temp, int *engineclock, int *memclock, float *vdd
void change_gpusettings(int gpu); void change_gpusettings(int gpu);
void gpu_autotune(int gpu, enum dev_enable *denable); void gpu_autotune(int gpu, enum dev_enable *denable);
void clear_adl(int nDevs); void clear_adl(int nDevs);
#else /* HAVE_ADL */ #else /* HAVE_ADL */
#define adl_active (0) #define adl_active (0)
static inline void init_adl(__maybe_unused int nDevs) {} static inline void init_adl(__maybe_unused int nDevs) {}
static inline void change_gpusettings(__maybe_unused int gpu) { } static inline void change_gpusettings(__maybe_unused int gpu) { }
static inline void clear_adl(__maybe_unused int nDevs) {} static inline void clear_adl(__maybe_unused int nDevs) {}
#endif
#endif #endif /* HAVE_ADL */
#endif /* ADL_H */

6
compat.h

@ -1,5 +1,5 @@
#ifndef __COMPAT_H__ #ifndef COMPAT_H
#define __COMPAT_H__ #define COMPAT_H
#ifdef WIN32 #ifdef WIN32
#include "config.h" #include "config.h"
@ -88,4 +88,4 @@ typedef long suseconds_t;
#define PTH(thr) ((thr)->pth) #define PTH(thr) ((thr)->pth)
#endif /* WIN32 */ #endif /* WIN32 */
#endif /* __COMPAT_H__ */ #endif /* COMPAT_H */

6
driver-opencl.h

@ -1,5 +1,5 @@
#ifndef __DEVICE_GPU_H__ #ifndef DEVICE_GPU_H
#define __DEVICE_GPU_H__ #define DEVICE_GPU_H
#include "miner.h" #include "miner.h"
@ -32,4 +32,4 @@ extern int opt_platform_id;
extern struct device_drv opencl_drv; extern struct device_drv opencl_drv;
#endif /* __DEVICE_GPU_H__ */ #endif /* DEVICE_GPU_H */

8
findnonce.h

@ -1,5 +1,6 @@
#ifndef __FINDNONCE_H__ #ifndef FINDNONCE_H
#define __FINDNONCE_H__ #define FINDNONCE_H
#include "miner.h" #include "miner.h"
#include "config.h" #include "config.h"
@ -11,4 +12,5 @@
extern void precalc_hash(dev_blk_ctx *blk, uint32_t *state, uint32_t *data); extern void precalc_hash(dev_blk_ctx *blk, uint32_t *state, uint32_t *data);
extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res); extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
#endif /*__FINDNONCE_H__*/
#endif /*FINDNONCE_H*/

6
logging.h

@ -1,5 +1,5 @@
#ifndef __LOGGING_H__ #ifndef LOGGING_H
#define __LOGGING_H__ #define LOGGING_H
#include "config.h" #include "config.h"
#include <stdbool.h> #include <stdbool.h>
@ -100,4 +100,4 @@ extern void _applog(int prio, const char *str, bool force);
#endif #endif
#endif /* __LOGGING_H__ */ #endif /* LOGGING_H */

6
miner.h

@ -1,5 +1,5 @@
#ifndef __MINER_H__ #ifndef MINER_H
#define __MINER_H__ #define MINER_H
#include "config.h" #include "config.h"
@ -1498,4 +1498,4 @@ extern struct api_data *api_add_diff(struct api_data *root, char *name, double *
extern struct api_data *api_add_percent(struct api_data *root, char *name, double *data, bool copy_data); extern struct api_data *api_add_percent(struct api_data *root, char *name, double *data, bool copy_data);
extern struct api_data *api_add_avg(struct api_data *root, char *name, float *data, bool copy_data); extern struct api_data *api_add_avg(struct api_data *root, char *name, float *data, bool copy_data);
#endif /* __MINER_H__ */ #endif /* MINER_H */

7
ocl.h

@ -1,5 +1,5 @@
#ifndef __OCL_H__ #ifndef OCL_H
#define __OCL_H__ #define OCL_H
#include "config.h" #include "config.h"
@ -35,4 +35,5 @@ typedef struct {
extern char *file_contents(const char *filename, int *length); extern char *file_contents(const char *filename, int *length);
extern int clDevicesNum(void); extern int clDevicesNum(void);
extern _clState *initCl(unsigned int gpu, char *name, size_t nameSize); extern _clState *initCl(unsigned int gpu, char *name, size_t nameSize);
#endif /* __OCL_H__ */
#endif /* OCL_H */

6
util.h

@ -1,5 +1,5 @@
#ifndef __UTIL_H__ #ifndef UTIL_H
#define __UTIL_H__ #define UTIL_H
#include <semaphore.h> #include <semaphore.h>
@ -164,4 +164,4 @@ static inline void align_len(size_t *len)
*len += 4 - (*len % 4); *len += 4 - (*len % 4);
} }
#endif /* __UTIL_H__ */ #endif /* UTIL_H */

Loading…
Cancel
Save