aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/buffer.c
diff options
context:
space:
mode:
authorNick Barnes2001-12-17 15:18:17 +0000
committerNick Barnes2001-12-17 15:18:17 +0000
commitdb4b3a6fa51ea452f62ed64612da5466d7bc292e (patch)
tree4401c0c97d4df2e1c48ad06f263c27199e92d5dc /mps/code/buffer.c
parentc864931fe4271b6592ca4a76ce856938d263c74a (diff)
downloademacs-db4b3a6fa51ea452f62ed64612da5466d7bc292e.tar.gz
emacs-db4b3a6fa51ea452f62ed64612da5466d7bc292e.zip
Remove trailing whitespace.
Copied from Perforce Change: 25309 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/buffer.c')
-rw-r--r--mps/code/buffer.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/mps/code/buffer.c b/mps/code/buffer.c
index 388196350a4..2cecc8111a5 100644
--- a/mps/code/buffer.c
+++ b/mps/code/buffer.c
@@ -80,7 +80,7 @@ Bool BufferCheck(Buffer buffer)
80 /* Nothing reliable to check for lightweight frame state */ 80 /* Nothing reliable to check for lightweight frame state */
81 CHECKL(buffer->poolLimit == (Addr)0); 81 CHECKL(buffer->poolLimit == (Addr)0);
82 } else { 82 } else {
83 Addr aplimit; 83 Addr aplimit;
84 84
85 /* The buffer is attached to a region of memory. */ 85 /* The buffer is attached to a region of memory. */
86 /* Check consistency. */ 86 /* Check consistency. */
@@ -154,7 +154,7 @@ Res BufferDescribe(Buffer buffer, mps_lib_FILE *stream)
154 res = WriteF(stream, 154 res = WriteF(stream,
155 "Buffer $P ($U) {\n", 155 "Buffer $P ($U) {\n",
156 (WriteFP)buffer, (WriteFU)buffer->serial, 156 (WriteFP)buffer, (WriteFU)buffer->serial,
157 " class $P (\"$S\")\n", 157 " class $P (\"$S\")\n",
158 (WriteFP)buffer->class, buffer->class->name, 158 (WriteFP)buffer->class, buffer->class->name,
159 " Arena $P\n", (WriteFP)buffer->arena, 159 " Arena $P\n", (WriteFP)buffer->arena,
160 " Pool $P\n", (WriteFP)buffer->pool, 160 " Pool $P\n", (WriteFP)buffer->pool,
@@ -196,7 +196,7 @@ static Res BufferInitV(Buffer buffer, BufferClass class,
196 AVERT(Pool, pool); 196 AVERT(Pool, pool);
197 /* The PoolClass should support buffer protocols */ 197 /* The PoolClass should support buffer protocols */
198 AVER((pool->class->attr & AttrBUF)); /* .trans.mod */ 198 AVER((pool->class->attr & AttrBUF)); /* .trans.mod */
199 199
200 arena = PoolArena(pool); 200 arena = PoolArena(pool);
201 /* Initialize the buffer. See impl.h.mpmst for a definition of */ 201 /* Initialize the buffer. See impl.h.mpmst for a definition of */
202 /* the structure. sig and serial comes later .init.sig-serial */ 202 /* the structure. sig and serial comes later .init.sig-serial */
@@ -254,7 +254,7 @@ failInit:
254 * 254 *
255 * See design.mps.buffer.method.create. */ 255 * See design.mps.buffer.method.create. */
256 256
257Res BufferCreate(Buffer *bufferReturn, BufferClass class, 257Res BufferCreate(Buffer *bufferReturn, BufferClass class,
258 Pool pool, Bool isMutator, ...) 258 Pool pool, Bool isMutator, ...)
259{ 259{
260 Res res; 260 Res res;
@@ -271,7 +271,7 @@ Res BufferCreate(Buffer *bufferReturn, BufferClass class,
271 * 271 *
272 * See design.mps.buffer.method.create. */ 272 * See design.mps.buffer.method.create. */
273 273
274Res BufferCreateV(Buffer *bufferReturn, BufferClass class, 274Res BufferCreateV(Buffer *bufferReturn, BufferClass class,
275 Pool pool, Bool isMutator, va_list args) 275 Pool pool, Bool isMutator, va_list args)
276{ 276{
277 Res res; 277 Res res;
@@ -286,7 +286,7 @@ Res BufferCreateV(Buffer *bufferReturn, BufferClass class,
286 arena = PoolArena(pool); 286 arena = PoolArena(pool);
287 287
288 /* Allocate memory for the buffer descriptor structure. */ 288 /* Allocate memory for the buffer descriptor structure. */
289 res = ControlAlloc(&p, arena, class->size, 289 res = ControlAlloc(&p, arena, class->size,
290 /* withReservoirPermit */ FALSE); 290 /* withReservoirPermit */ FALSE);
291 if (res != ResOK) 291 if (res != ResOK)
292 goto failAlloc; 292 goto failAlloc;
@@ -404,7 +404,7 @@ void BufferFinish(Buffer buffer)
404 /* Detach the buffer from its owning pool and unsig it. */ 404 /* Detach the buffer from its owning pool and unsig it. */
405 RingRemove(&buffer->poolRing); 405 RingRemove(&buffer->poolRing);
406 buffer->sig = SigInvalid; 406 buffer->sig = SigInvalid;
407 407
408 /* Finish off the generic buffer fields. */ 408 /* Finish off the generic buffer fields. */
409 RingFinish(&buffer->poolRing); 409 RingFinish(&buffer->poolRing);
410 410
@@ -568,7 +568,7 @@ Res BufferFramePush(AllocFrame *frameReturn, Buffer buffer)
568 if (buffer->mode & BufferModeFLIPPED) { 568 if (buffer->mode & BufferModeFLIPPED) {
569 BufferSetUnflipped(buffer); 569 BufferSetUnflipped(buffer);
570 } 570 }
571 571
572 /* check for PopPending */ 572 /* check for PopPending */
573 if (BufferIsTrappedByMutator(buffer)) { 573 if (BufferIsTrappedByMutator(buffer)) {
574 BufferFrameNotifyPopPending(buffer); 574 BufferFrameNotifyPopPending(buffer);
@@ -590,7 +590,7 @@ Res BufferFramePop(Buffer buffer, AllocFrame frame)
590 /* frame is of an abstract type & can't be checked */ 590 /* frame is of an abstract type & can't be checked */
591 pool = BufferPool(buffer); 591 pool = BufferPool(buffer);
592 return (*pool->class->framePop)(pool, buffer, frame); 592 return (*pool->class->framePop)(pool, buffer, frame);
593 593
594} 594}
595 595
596 596
@@ -631,7 +631,7 @@ Res BufferReserve(Addr *pReturn, Buffer buffer, Size size,
631 * BufferAttach is entered because of a BufferFill, or because of a Pop 631 * BufferAttach is entered because of a BufferFill, or because of a Pop
632 * operation on a lightweight frame. */ 632 * operation on a lightweight frame. */
633 633
634void BufferAttach(Buffer buffer, Addr base, Addr limit, 634void BufferAttach(Buffer buffer, Addr base, Addr limit,
635 Addr init, Size size) 635 Addr init, Size size)
636{ 636{
637 Size filled; 637 Size filled;
@@ -1099,7 +1099,7 @@ static void bufferTrivFinish (Buffer buffer)
1099 1099
1100/* bufferTrivAttach -- basic buffer attach method */ 1100/* bufferTrivAttach -- basic buffer attach method */
1101 1101
1102static void bufferTrivAttach(Buffer buffer, Addr base, Addr limit, 1102static void bufferTrivAttach(Buffer buffer, Addr base, Addr limit,
1103 Addr init, Size size) 1103 Addr init, Size size)
1104{ 1104{
1105 /* No special attach method for simple buffers */ 1105 /* No special attach method for simple buffers */
@@ -1123,7 +1123,7 @@ static void bufferTrivDetach(Buffer buffer)
1123} 1123}
1124 1124
1125 1125
1126/* bufferNoSeg -- basic buffer BufferSeg accessor method 1126/* bufferNoSeg -- basic buffer BufferSeg accessor method
1127 * 1127 *
1128 * .noseg: basic buffers don't support segments, so this method should 1128 * .noseg: basic buffers don't support segments, so this method should
1129 * not be called. */ 1129 * not be called. */
@@ -1147,7 +1147,7 @@ static RankSet bufferTrivRankSet (Buffer buffer)
1147} 1147}
1148 1148
1149 1149
1150/* bufferNoSetRankSet -- basic BufferSetRankSet setter method 1150/* bufferNoSetRankSet -- basic BufferSetRankSet setter method
1151 * 1151 *
1152 * .norank: basic buffers don't support ranksets, so this method should 1152 * .norank: basic buffers don't support ranksets, so this method should
1153 * not be called. */ 1153 * not be called. */
@@ -1160,7 +1160,7 @@ static void bufferNoSetRankSet (Buffer buffer, RankSet rankset)
1160} 1160}
1161 1161
1162 1162
1163/* bufferNoReassignSeg -- basic BufferReassignSeg method 1163/* bufferNoReassignSeg -- basic BufferReassignSeg method
1164 * 1164 *
1165 * .noseg: basic buffers don't support attachment to sements, so this 1165 * .noseg: basic buffers don't support attachment to sements, so this
1166 * method should not be called. */ 1166 * method should not be called. */
@@ -1202,10 +1202,10 @@ Bool BufferClassCheck(BufferClass class)
1202 CHECKL(FUNCHECK(class->describe)); 1202 CHECKL(FUNCHECK(class->describe));
1203 CHECKS(BufferClass, class); 1203 CHECKS(BufferClass, class);
1204 return TRUE; 1204 return TRUE;
1205} 1205}
1206 1206
1207 1207
1208/* BufferClass -- the vanilla buffer class definition 1208/* BufferClass -- the vanilla buffer class definition
1209 * 1209 *
1210 * See design.mps.buffer.class.hierarchy.buffer. */ 1210 * See design.mps.buffer.class.hierarchy.buffer. */
1211 1211
@@ -1257,7 +1257,7 @@ Bool SegBufCheck(SegBuf segbuf)
1257 CHECKL(SegCheck(segbuf->seg)); 1257 CHECKL(SegCheck(segbuf->seg));
1258 /* To avoid recursive checking, leave it to SegCheck to make */ 1258 /* To avoid recursive checking, leave it to SegCheck to make */
1259 /* sure the buffer and segment fields tally. */ 1259 /* sure the buffer and segment fields tally. */
1260 1260
1261 if (buffer->mode & BufferModeFLIPPED) { 1261 if (buffer->mode & BufferModeFLIPPED) {
1262 /* Only buffers that allocate pointers get flipped. */ 1262 /* Only buffers that allocate pointers get flipped. */
1263 CHECKL(segbuf->rankSet != RankSetEMPTY); 1263 CHECKL(segbuf->rankSet != RankSetEMPTY);
@@ -1318,7 +1318,7 @@ static void segBufFinish (Buffer buffer)
1318 1318
1319/* segBufAttach -- SegBuf attach method */ 1319/* segBufAttach -- SegBuf attach method */
1320 1320
1321static void segBufAttach(Buffer buffer, Addr base, Addr limit, 1321static void segBufAttach(Buffer buffer, Addr base, Addr limit,
1322 Addr init, Size size) 1322 Addr init, Size size)
1323{ 1323{
1324 SegBuf segbuf; 1324 SegBuf segbuf;
@@ -1455,11 +1455,11 @@ static Res segBufDescribe(Buffer buffer, mps_lib_FILE *stream)
1455} 1455}
1456 1456
1457 1457
1458/* SegBufClass -- SegBuf class definition 1458/* SegBufClass -- SegBuf class definition
1459 * 1459 *
1460 * Supports an association with a single segment when attached. See 1460 * Supports an association with a single segment when attached. See
1461 * design.mps.buffer.class.hierarchy.segbuf. */ 1461 * design.mps.buffer.class.hierarchy.segbuf. */
1462 1462
1463typedef BufferClassStruct SegBufClassStruct; 1463typedef BufferClassStruct SegBufClassStruct;
1464 1464
1465DEFINE_CLASS(SegBufClass, class) 1465DEFINE_CLASS(SegBufClass, class)
@@ -1510,12 +1510,12 @@ static Res rankBufInit (Buffer buffer, Pool pool, va_list args)
1510} 1510}
1511 1511
1512 1512
1513/* RankBufClass -- RankBufClass class definition 1513/* RankBufClass -- RankBufClass class definition
1514 * 1514 *
1515 * A subclass of SegBufClass, sharing structure for instances. 1515 * A subclass of SegBufClass, sharing structure for instances.
1516 * 1516 *
1517 * Supports initialization to a rank supplied at creation time. */ 1517 * Supports initialization to a rank supplied at creation time. */
1518 1518
1519typedef BufferClassStruct RankBufClassStruct; 1519typedef BufferClassStruct RankBufClassStruct;
1520 1520
1521DEFINE_CLASS(RankBufClass, class) 1521DEFINE_CLASS(RankBufClass, class)