123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef SPONDA_HFILE
- #define SPONDA_HFILE
- #include "miner.h"
- #include "driver-spondoolies-sp10-p.h"
- #define SP_NTIME
- typedef enum adapter_state {
- ADAPTER_STATE_INIT,
- ADAPTER_STATE_OPERATIONAL,
- } ADAPTER_STATE;
- typedef enum spond_work_state {
- SPONDWORK_STATE_EMPTY,
- SPONDWORK_STATE_IN_BUSY,
- } SPONDWORK_STATE;
- #define MAX_JOBS_IN_MINERGATE MINERGATE_TOTAL_QUEUE
- #define MAX_NROLES 50
- typedef struct {
- struct work *cgminer_work;
- SPONDWORK_STATE state;
- uint32_t merkle_root;
- time_t start_time;
- int job_id[MAX_NROLES];
- int ntime_clones;
- } spond_driver_work;
- struct spond_adapter {
- pthread_mutex_t lock;
- ADAPTER_STATE adapter_state;
- void *cgpu;
-
- int wins;
- int good;
- int empty;
- int bad;
- int overflow;
-
- int works_in_driver;
- int works_in_minergate_and_pending_tx;
- int works_pending_tx;
- int socket_fd;
- int reset_mg_queue;
- int current_job_id;
- int parse_resp;
- minergate_req_packet* mp_next_req;
- minergate_rsp_packet* mp_last_rsp;
- spond_driver_work my_jobs[MAX_JOBS_IN_MINERGATE];
-
- int temp_rate;
- int front_temp;
- int rear_temp_top;
- int rear_temp_bot;
-
- time_t last_stats;
- };
- int spond_one_sec_timer_scaling(struct spond_adapter *a, int t);
- int spond_do_scaling(struct spond_adapter *a);
- extern void one_sec_spondoolies_watchdog(int uptime);
- #define REQUEST_PERIOD (100000)
- #define REQUEST_SIZE 100
- #endif
|