Check-in Number:
|
2599 | |
Date: |
2002-Oct-17 12:17:54 (local)
2002-Oct-17 10:17:54 (UTC) |
User: | mlelstv |
Branch: | |
Comment: |
make comment clearer about not resizing chunks in a shared buffer
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from: |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/sio/al.c 1.14 -> 1.15
--- al.c 2002/10/16 12:37:08 1.14
+++ al.c 2002/10/17 10:17:54 1.15
@@ -236,7 +236,11 @@
((n) > AL_CHUNK_LEN(alc) - (off) ? \
AL_CHUNK_LEN(alc) - (off) : (n))
-/* number of bytes a chunk can be grown to the end */
+/*
+ * number of bytes a chunk can be grown to the end
+ * we must not grow a chunk in a shared buffer since
+ * we do not track other chunks sharing the buffer
+ */
#define AL_CHUNK_RESERVE(alc) \
((alc) \
? (alc)->buf->usecount > 1 ? 0 : (alc)->buf->size - (alc)->end \
@@ -246,7 +250,11 @@
#define AL_RESIZE(al, alc, n) \
do { (alc)->end += n; (al)->bytes += (n); } while (0)
-/* number of bytes a chunk can be grown to the beginning */
+/*
+ * number of bytes a chunk can be grown to the beginning
+ * we must not grow a chunk in a shared buffer since
+ * we do not track other chunks sharing the buffer
+ */
#define AL_CHUNK_PRESERVE(alc) \
((alc) \
? (alc)->buf->usecount > 1 ? 0 : (alc)->begin \
|
|