[haiku-commits] r35242 - haiku/trunk/src/add-ons/kernel/network/stack

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 22 Jan 2010 21:01:26 +0100 (CET)

Author: bonefish
Date: 2010-01-22 21:01:26 +0100 (Fri, 22 Jan 2010)
New Revision: 35242
Changeset: http://dev.haiku-os.org/changeset/35242/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/network/stack/net_buffer.cpp
Log:
There's no reason for allocating with CACHE_DONT_SLEEP. The only thing that
would get us is that the allocations could fail when they wouldn't need to.


Modified: haiku/trunk/src/add-ons/kernel/network/stack/net_buffer.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/network/stack/net_buffer.cpp 2010-01-22 
19:58:04 UTC (rev 35241)
+++ haiku/trunk/src/add-ons/kernel/network/stack/net_buffer.cpp 2010-01-22 
20:01:26 UTC (rev 35242)
@@ -709,7 +709,7 @@
        atomic_add(&sAllocatedDataHeaderCount, 1);
        atomic_add(&sEverAllocatedDataHeaderCount, 1);
 #endif
-       return (data_header*)object_cache_alloc(sDataNodeCache, 
CACHE_DONT_SLEEP);
+       return (data_header*)object_cache_alloc(sDataNodeCache, 0);
 }
 
 
@@ -720,8 +720,7 @@
        atomic_add(&sAllocatedNetBufferCount, 1);
        atomic_add(&sEverAllocatedNetBufferCount, 1);
 #endif
-       return (net_buffer_private*)object_cache_alloc(sNetBufferCache,
-               CACHE_DONT_SLEEP);
+       return (net_buffer_private*)object_cache_alloc(sNetBufferCache, 0);
 }
 
 


Other related posts:

  • » [haiku-commits] r35242 - haiku/trunk/src/add-ons/kernel/network/stack - ingo_weinhold