xref: /csrg-svn/sys/tahoe/align/Aput_byte.c (revision 45760)
1*45760Sbostic /*-
2*45760Sbostic  * Copyright (c) 1986 The Regents of the University of California.
3*45760Sbostic  * All rights reserved.
4*45760Sbostic  *
5*45760Sbostic  * This code is derived from software contributed to Berkeley by
6*45760Sbostic  * Computer Consoles Inc.
7*45760Sbostic  *
8*45760Sbostic  * %sccs.include.redist.c%
9*45760Sbostic  *
10*45760Sbostic  *	@(#)Aput_byte.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229628Ssam 
1345699Sbostic #include	"align.h"
1429628Ssam 
put_byte(infop,byte,where)1529628Ssam put_byte (infop, byte, where)
1629628Ssam process_info	*infop;
1729628Ssam char		*where;
1829628Ssam long		byte;
1929628Ssam /*
2029628Ssam /*	Put the byte at the given address in memory.
2129628Ssam /*	Caveat: It's quite difficult to find a pte reference
2229628Ssam /*		fault.  So I took the easy way out and just signal
2329628Ssam /*		an illegal access.
2429628Ssam /*
2529628Ssam /**************************************************/
2629628Ssam {
2729628Ssam 	register long code;
2829628Ssam 
2929628Ssam 	code = writeable(infop, where, 1);
3029628Ssam 	if ( code == TRUE ) {
3129628Ssam 		*where = byte;
3229628Ssam 	} else exception (infop, ILL_ACCESS, where, code);
3329628Ssam }
34