xref: /original-bsd/sys/tahoe/align/Aput_byte.c (revision 3b6250d9)
1 /*-
2  * Copyright (c) 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Computer Consoles Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)Aput_byte.c	7.1 (Berkeley) 12/06/90
11  */
12 
13 #include	"align.h"
14 
15 put_byte (infop, byte, where)
16 process_info	*infop;
17 char		*where;
18 long		byte;
19 /*
20 /*	Put the byte at the given address in memory.
21 /*	Caveat: It's quite difficult to find a pte reference
22 /*		fault.  So I took the easy way out and just signal
23 /*		an illegal access.
24 /*
25 /**************************************************/
26 {
27 	register long code;
28 
29 	code = writeable(infop, where, 1);
30 	if ( code == TRUE ) {
31 		*where = byte;
32 	} else exception (infop, ILL_ACCESS, where, code);
33 }
34