struct sclp_req { struct list_head list; /* list_head for request queueing. */
sclp_cmdw_t command; /* sclp command to execute */ void *sccb; /* pointer to the sccb to execute */ char status; /* status of this request */ int start_count; /* number of SVCs done for this req */ /* Callback that is called after reaching final status. */ void (*callback)(struct sclp_req *, void *data); void *callback_data; int queue_timeout; /* request queue timeout (sec), set by caller of sclp_add_request(), if
needed */ /* Internal fields */ unsignedlong queue_expires; /* request queue timeout (jiffies) */
};
#define SCLP_REQ_FILLED 0x00 /* request is ready to be processed */ #define SCLP_REQ_QUEUED 0x01 /* request is queued to be processed */ #define SCLP_REQ_RUNNING 0x02 /* request is currently running */ #define SCLP_REQ_DONE 0x03 /* request is completed successfully */ #define SCLP_REQ_FAILED 0x05 /* request is finally failed */ #define SCLP_REQ_QUEUED_TIMEOUT 0x06 /* request on queue timed out */
#define SCLP_QUEUE_INTERVAL 5 /* timeout interval for request queue */
/* function pointers that a high level driver has to use for registration */ /* of some routines it wants to be called from the low level driver */ struct sclp_register { struct list_head list; /* User wants to receive: */
sccb_mask_t receive_mask; /* User wants to send: */
sccb_mask_t send_mask; /* H/W can receive: */
sccb_mask_t sclp_receive_mask; /* H/W can send: */
sccb_mask_t sclp_send_mask; /* called if event type availability changes */ void (*state_change_fn)(struct sclp_register *); /* called for events in cp_receive_mask/sclp_receive_mask */ void (*receiver_fn)(struct evbuf_header *);
};
/* externals from sclp.c */ int sclp_add_request(struct sclp_req *req); void sclp_sync_wait(void); int sclp_register(struct sclp_register *reg); void sclp_unregister(struct sclp_register *reg); int sclp_remove_processed(struct sccb_header *sccb); int sclp_deactivate(void); int sclp_reactivate(void); int sclp_sync_request(sclp_cmdw_t command, void *sccb); int sclp_sync_request_timeout(sclp_cmdw_t command, void *sccb, int timeout); int sclp_sdias_init(void);
/* VM uses EBCDIC 037, LPAR+native(SE+HMC) use EBCDIC 500 */ /* translate single character from ASCII to EBCDIC */ staticinlineunsignedchar
sclp_ascebc(unsignedchar ch)
{ return (machine_is_vm()) ? _ascebc[ch] : _ascebc_500[ch];
}
/* translate string from EBCDIC to ASCII */ staticinlinevoid
sclp_ebcasc_str(char *str, int nr)
{
(machine_is_vm()) ? EBCASC(str, nr) : EBCASC_500(str, nr);
}
/* translate string from ASCII to EBCDIC */ staticinlinevoid
sclp_ascebc_str(char *str, int nr)
{
(machine_is_vm()) ? ASCEBC(str, nr) : ASCEBC_500(str, nr);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.