OSSP CVS Repository

ossp - Difference in ossp-pkg/sio/al.c versions 1.14 and 1.15
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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 \

CVSTrac 2.0.1