Fixed some style bugs (spaces instead of tabs in macro definitions ...).
This commit is contained in:
parent
df7c361e64
commit
ef4ddd38bf
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MSGBUF_H_
|
||||
#define _SYS_MSGBUF_H_
|
||||
#define _SYS_MSGBUF_H_
|
||||
|
||||
struct msgbuf {
|
||||
char *msg_ptr; /* pointer to buffer */
|
||||
@ -48,16 +48,17 @@ struct msgbuf {
|
||||
u_int msg_seqmod; /* range for sequence numbers */
|
||||
};
|
||||
|
||||
/* Normalise a sequence number or a difference between sequence numbers */
|
||||
#define MSGBUF_SEQNORM(mbp, seq) (((seq) + (mbp)->msg_seqmod) % \
|
||||
/* Normalise a sequence number or a difference between sequence numbers. */
|
||||
#define MSGBUF_SEQNORM(mbp, seq) (((seq) + (mbp)->msg_seqmod) % \
|
||||
(mbp)->msg_seqmod)
|
||||
#define MSGBUF_SEQ_TO_POS(mbp, seq) ((seq) % (mbp)->msg_size)
|
||||
/* Subtract sequence numbers, but note that only positive values result. */
|
||||
#define MSGBUF_SEQSUB(mbp, seq1, seq2) (MSGBUF_SEQNORM((mbp), (seq1) - (seq2)))
|
||||
#define MSGBUF_SEQ_TO_POS(mbp, seq) ((seq) % (mbp)->msg_size)
|
||||
/* Subtract sequence numbers. Note that only positive values result. */
|
||||
#define MSGBUF_SEQSUB(mbp, seq1, seq2) (MSGBUF_SEQNORM((mbp), (seq1) - (seq2)))
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern int msgbuftrigger;
|
||||
extern struct msgbuf *msgbufp;
|
||||
|
||||
void msgbufinit(void *ptr, int size);
|
||||
void msgbuf_addchar(struct msgbuf *mbp, int c);
|
||||
void msgbuf_clear(struct msgbuf *mbp);
|
||||
@ -66,14 +67,13 @@ int msgbuf_getbytes(struct msgbuf *mbp, char *buf, int buflen);
|
||||
int msgbuf_getchar(struct msgbuf *mbp);
|
||||
int msgbuf_getcount(struct msgbuf *mbp);
|
||||
void msgbuf_init(struct msgbuf *mbp, void *ptr, int size);
|
||||
void msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size);
|
||||
int msgbuf_peekbytes(struct msgbuf *mbp, char *buf, int buflen,
|
||||
u_int *seqp);
|
||||
void msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size);
|
||||
|
||||
#if !defined(MSGBUF_SIZE)
|
||||
#ifndef MSGBUF_SIZE
|
||||
#define MSGBUF_SIZE 32768
|
||||
#endif
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* !_SYS_MSGBUF_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user