uint8 NECDSP::read(unsigned addr) { if(!debugger_access()) cpu.synchronize_coprocessor(); if((addr & srmask) == srtest) return sr_read(); if((addr & drmask) == drtest) return dr_read(); if((addr & dpmask) == dptest) return dp_read(addr); return 0x00; }
int database_job_load (int sfd, struct job *job) { uint32_t datasize; //if (!dr_file_read(sfd,(char*)&datasize,sizeof(datasize))) { if (!dr_read(sfd,(char*)&datasize,sizeof(datasize))) { log_auto (L_ERROR,"database_job_load(): error reading job data size (%u). (%s)",ntohl(datasize),strerror(drerrno_system)); return 0; } datasize = ntohl (datasize); if (datasize != sizeof (struct job)) { log_auto (L_ERROR,"database_job_load(): job data sizes do not match. Read: %u Current: %u",datasize,sizeof(struct job)); return 0; } job_delete(job); //if (!dr_file_read(sfd,(char*)job,datasize)) { if (!dr_read(sfd, (char*)job, datasize)) { log_auto (L_ERROR,"database_job_load(): error reading job main information. (%s)",strerror(drerrno_system)); return 0; } job_bswap_from_network (job,job); job_fix_received_invalid (job); if (job->used) { if (!database_job_load_envvars (sfd,job)) { log_auto (L_ERROR,"database_job_load(): error reading job environment variables. (%s)",strerror(drerrno_system)); return 0; } if (!database_job_load_frames(sfd,job)) { log_auto (L_ERROR,"database_job_load(): error reading job frame information. (%s)",strerror(drerrno_system)); return 0; } if (!database_job_load_blocked_hosts(sfd,job)) { log_auto (L_ERROR,"database_job_load(): error reading job blocked hosts list. (%s)",strerror(drerrno_system)); return 0; } } drerrno = DRE_NOERROR; return 1; }