diff options
Diffstat (limited to 'include/mach/profil.h')
-rw-r--r-- | include/mach/profil.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/mach/profil.h b/include/mach/profil.h index aa92bc4d..9c6e983f 100644 --- a/include/mach/profil.h +++ b/include/mach/profil.h @@ -96,7 +96,7 @@ typedef struct buffer *buffer_t; extern vm_map_t kernel_map; #define dealloc_pbuf_area(pbuf) \ - MACRO_BEGIN \ + do { \ register int i; \ \ for(i=0; i < NB_PROF_BUFFER ; i++) \ @@ -106,11 +106,11 @@ extern vm_map_t kernel_map; kmem_free(kernel_map, \ (vm_offset_t)(pbuf), \ sizeof(struct prof_data)); \ - MACRO_END + } while(0) #define alloc_pbuf_area(pbuf, vmpbuf) \ -MACRO_BEGIN \ +do { \ (vmpbuf) = (vm_offset_t) 0; \ if (kmem_alloc(kernel_map, &(vmpbuf) , sizeof(struct prof_data)) == \ KERN_SUCCESS) { \ @@ -132,7 +132,7 @@ MACRO_BEGIN \ } \ else \ (pbuf) = NULLPBUF; \ -MACRO_END +} while(0) @@ -148,7 +148,7 @@ MACRO_END */ #define set_pbuf_value(pbuf, val) \ - MACRO_BEGIN \ + do { \ register buffer_t a = &((pbuf)->prof_area[(pbuf)->prof_index]); \ register int i = a->p_index++; \ register boolean_t f = a->p_full; \ @@ -164,16 +164,16 @@ MACRO_END else \ *(val) = 1; \ } \ - MACRO_END + } while(0) #define reset_pbuf_area(pbuf) \ - MACRO_BEGIN \ + do { \ register int *i = &((pbuf)->prof_index); \ \ *i = (*i == NB_PROF_BUFFER-1) ? 0 : ++(*i); \ (pbuf)->prof_area[*i].p_index = 0; \ - MACRO_END + } while(0) /**************************************************************/ |