mirror of
https://github.com/rcornwell/sims.git
synced 2026-01-23 02:47:57 +00:00
IBM360: Removed inlude of time.h, switch time to sim_get_time.
This commit is contained in:
parent
7c21f44482
commit
a3c7c5c442
@ -73,7 +73,6 @@
|
||||
*/
|
||||
|
||||
#include "ibm360_defs.h" /* simulator defns */
|
||||
#include <sys/time.h>
|
||||
|
||||
#define MEMAMOUNT(x) (x)
|
||||
#define TMR_RTC 0
|
||||
@ -5812,12 +5811,13 @@ t_stat cpu_reset (DEVICE *dptr)
|
||||
#ifdef USE_64BIT
|
||||
if (clk_state == CLOCK_UNSET) {
|
||||
/* Set TOD to current time */
|
||||
time_t seconds = time(NULL);
|
||||
seconds += ((70 * 365) + 17) * 86400ULL;
|
||||
seconds *= 1000000ULL;
|
||||
seconds <<= 12;
|
||||
tod_clock[0] = (uint32)(seconds >> 32);
|
||||
tod_clock[1] = (uint32)(seconds & FMASK);
|
||||
time_t seconds = sim_get_time(NULL);
|
||||
t_uint64 lsec = (t_uint64)seconds;
|
||||
lsec += ((70 * 365) + 17) * 86400ULL;
|
||||
lsec *= 1000000ULL;
|
||||
lsec <<= 12;
|
||||
tod_clock[0] = (uint32)(lsec >> 32);
|
||||
tod_clock[1] = (uint32)(lsec & FMASK);
|
||||
}
|
||||
#endif
|
||||
cregs[0] = 0x000000e0;
|
||||
|
||||
@ -370,14 +370,12 @@ uint8 dasd_startio(UNIT *uptr) {
|
||||
int unit = (uptr - dptr->units);
|
||||
unsigned int i;
|
||||
|
||||
#if 0
|
||||
/* Check if controller is free */
|
||||
for (i = 0; i < dptr->numunits; i++) {
|
||||
int cmd = (dptr->units[i].CMD) & 0xff;
|
||||
if (cmd != 0 && cmd != DK_SEEK)
|
||||
return SNS_BSY;
|
||||
}
|
||||
#endif
|
||||
uptr->CMD &= ~(DK_INDEX|DK_NOEQ|DK_HIGH|DK_PARAM|DK_MSET|DK_DONE|DK_INDEX2);
|
||||
if ((uptr->flags & UNIT_ATT) != 0) {
|
||||
struct dasd_t *data = (struct dasd_t *)(uptr->up7);
|
||||
|
||||
@ -238,7 +238,6 @@ uint8 mt_startio(UNIT *uptr) {
|
||||
DEVICE *dptr = find_dev_from_unit(uptr);
|
||||
unsigned int i;
|
||||
|
||||
#if 0
|
||||
if (mt_busy[GET_DEV_BUF(dptr->flags)] != 0) {
|
||||
sim_debug(DEBUG_CMD, dptr, "busy\n");
|
||||
uptr->flags |= MT_BUSY; /* Flag we need to send CUE */
|
||||
@ -252,7 +251,6 @@ uint8 mt_startio(UNIT *uptr) {
|
||||
}
|
||||
}
|
||||
sim_debug(DEBUG_CMD, dptr, "start io\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user