1
1

Replacing C++-style comments with C-style comments.

This commit was SVN r97.
Этот коммит содержится в:
David Daniel 2004-01-07 21:01:40 +00:00
родитель 9515a7f2f0
Коммит fb846e6c0b
10 изменённых файлов: 39 добавлений и 41 удалений

Просмотреть файл

@ -221,10 +221,10 @@ int lam_frl_init_with(
}
// initialize locks for memory pool and individual list and link locks
/* initialize locks for memory pool and individual list and link locks */
for ( pool = 0; pool < flist->fl_nlists; pool++ ) {
// gain exclusive use of list
/* gain exclusive use of list */
if ( 1 == lam_sgl_lock_list(flist->fl_free_lists[pool]) ) {
while ( lam_sgl_get_bytes_pushed(flist->fl_free_lists[pool])
@ -343,15 +343,15 @@ static void *lam_frl_get_mem_chunk(lam_free_list_t *flist, int index, size_t *le
return chunk;
}
}
// set len
/* set len */
*len = sz_to_add;
// get chunk of memory
/* get chunk of memory */
chunk = lam_mp_request_chunk(flist->fl_pool, index);
if ( 0 == chunk )
{
// increment failure count
/* increment failure count */
lam_sgl_inc_consec_fail(flist->fl_free_lists[index]);
if ( lam_sgl_get_consec_fail(flist->fl_free_lists[index]) >=
lam_sgl_get_max_consec_fail(flist->fl_free_lists[index]) )
@ -394,7 +394,7 @@ static lam_flist_elt_t *lam_flr_request_elt(lam_free_list_t *flist, int pool_idx
static void lam_frl_append(lam_free_list_t *flist, void *chunk, int pool_idx)
{
/* ASSERT: mp_chunk_sz >= fl_elt_per_chunk * fl_elt_size */
// push items onto list
/* push items onto list */
lam_sgl_append_elt_chunk(flist->fl_free_lists[pool_idx],
chunk, lam_mp_get_chunk_size(flist->fl_pool),
flist->fl_elt_per_chunk, flist->fl_elt_size);
@ -417,7 +417,7 @@ static int lam_frl_create_more_elts(lam_free_list_t *flist, int pool_idx)
return err;
}
// attach memory affinity
/* attach memory affinity */
if ( flist->fl_enforce_affinity )
{
if (!lam_set_affinity(ptr, len_added,

Просмотреть файл

@ -158,7 +158,7 @@ int lam_mp_init_with(lam_mem_pool_t *pool, uint64_t pool_size,
pool->mp_chunks[chunk].chd_base_ptr = ptr;
ptr += chunk_size;
}
// set next available chunk
/* set next available chunk */
pool->mp_next_avail_chunk = 0;
return 1;
@ -174,10 +174,10 @@ void *lam_mp_request_chunk(lam_mem_pool_t *pool, int pool_index)
size_t to_alloc;
int desc;
// grab lock on pool
/* grab lock on pool */
lam_mtx_lock(&(pool->mp_lock));
// Have we used all the allocated memory ?
/* Have we used all the allocated memory? */
if ( pool->mp_next_avail_chunk == pool->mp_num_chunks )
{
@ -223,7 +223,7 @@ void *lam_mp_request_chunk(lam_mem_pool_t *pool, int pool_index)
return chunk;
}
// reset pool chunk counter
/* reset pool chunk counter */
pool->mp_num_chunks++;
}
@ -370,7 +370,7 @@ int lam_fmp_init_with(lam_fixed_mpool_t *pool, ssize_t initial_allocation,
pool->fmp_segments[pool_idx][0].ms_length = initial_allocation;
pool->fmp_segments[pool_idx][0].ms_mem_available = initial_allocation;
// update the number of elements in use
/* update the number of elements in use */
pool->fmp_n_segments[pool_idx] = 1;
} /* end pool loop */

Просмотреть файл

@ -46,9 +46,9 @@ void *lam_zero_alloc(size_t len, int mem_prot, int mem_flags)
#else /* this is __osf__ */
if( mem_flags & MAP_PRIVATE ) {
//
// private memory allocation
//
/*
* private memory allocation
*/
fd = open("/dev/zero", O_RDWR);
if (fd < 0)
{
@ -79,9 +79,9 @@ void *lam_zero_alloc(size_t len, int mem_prot, int mem_flags)
memset(ptr, 0, paddedLen * sizeof(char));
ptr = (char *)ptr + (pageSize - 1);
ptr = (void *)((long)ptr & ~(pageSize - 1));
//
// shared memory allocation
//
/*
* shared memory allocation
*/
fd = -1;
ptr = mmap(ptr, len, mem_prot, MAP_FIXED | mem_flags, fd, 0);
@ -91,7 +91,7 @@ void *lam_zero_alloc(size_t len, int mem_prot, int mem_flags)
perror(" mmap failed");
return (void *)0;
}
} // end memory allocation
} /* end memory allocation */
#endif /* __osf__ */
return ptr;

Просмотреть файл

@ -132,8 +132,6 @@ static inline int fetchNset(volatile int *addr, int setValue)
return (inputValue);
}
//#endif /* __INTEL_COMPILER */
/*
* Clear the lock

Просмотреть файл

@ -20,7 +20,7 @@
#define SMPFirstFragPayload 3496
#define SMPSecondFragPayload 8192
#define CACHE_ALIGNMENT 256
// Reference: http://developer.apple.com/hardware/ve/caches.html gives cacheline as 32 bytes
/* Reference: http://developer.apple.com/hardware/ve/caches.html gives cacheline as 32 bytes */
#else
#error

Просмотреть файл

@ -132,8 +132,6 @@ static inline int fetchNset(volatile int *addr, int setValue)
return (inputValue);
}
//#endif /* __INTEL_COMPILER */
/*
* Clear the lock

Просмотреть файл

@ -132,9 +132,6 @@ inline int fetchNset(volatile int *addr, int setValue)
return (inputValue);
}
//#endif /* __INTEL_COMPILER */
/*
* Clear the lock
*/

Просмотреть файл

@ -2,9 +2,11 @@
* $HEADER$
*/
// ulm_os.h - This file contains IRIX OS dependent definitions.
/*
* ulm_os.h - This file contains IRIX OS dependent definitions.
*/
// memory page size
/* memory page size */
#define LOG2PAGESIZE 13
#define SMPPAGESIZE (1 << LOG2PAGESIZE)
@ -15,7 +17,7 @@
#define CACHE_ALIGNMENT 64
// if cxx is invoked with -model ansi -accept restrict_keyword
/* if cxx is invoked with -model ansi -accept restrict_keyword */
#ifdef __MODEL_ANSI
#define RESTRICT_MACRO __restrict
#else

Просмотреть файл

@ -176,10 +176,12 @@ bool lam_reactor_remove(lam_reactor_t* r, int sd, lam_reactor_listener_t* rl, in
void lam_reactor_dispatch(lam_reactor_t* r, int cnt, lam_fd_set_t* rset, lam_fd_set_t* sset, lam_fd_set_t* eset)
{
// walk through the active list w/out holding lock, as this thread
// is the only one that modifies the active list. however, note
// that the descriptor flags could have been cleared in a callback,
// so check that the flag is still set before invoking the callbacks
/*
* walk through the active list w/out holding lock, as this thread
* is the only one that modifies the active list. however, note
* that the descriptor flags could have been cleared in a callback,
* so check that the flag is still set before invoking the callbacks
*/
lam_reactor_descriptor_t *descriptor;
for(descriptor = (lam_reactor_descriptor_t*)lam_dbl_get_first(&r->r_active);
@ -208,7 +210,7 @@ void lam_reactor_dispatch(lam_reactor_t* r, int cnt, lam_fd_set_t* rset, lam_fd_
return;
}
// cleanup any pending deletes while holding the lock
/* cleanup any pending deletes while holding the lock */
descriptor = (lam_reactor_descriptor_t*)lam_dbl_get_first(&r->r_active);
while(descriptor != 0) {
lam_reactor_descriptor_t* next = (lam_reactor_descriptor_t*)lam_dbl_get_next(&r->r_active);
@ -225,7 +227,7 @@ void lam_reactor_dispatch(lam_reactor_t* r, int cnt, lam_fd_set_t* rset, lam_fd_
descriptor = next;
}
// add any other pending inserts/deletes
/* add any other pending inserts/deletes */
while(lam_dbl_get_size(&r->r_pending)) {
lam_reactor_descriptor_t* descriptor = (lam_reactor_descriptor_t*)lam_dbl_remove_first(&r->r_pending);
if(descriptor->rd_flags == 0) {

Просмотреть файл

@ -18,11 +18,12 @@ extern const int LAM_NOTIFY_EXCEPT;
extern lam_class_info_t lam_reactor_cls;
//
// Utilizes select() to provide callbacks when an event (e.g. readable,writeable,exception)
// occurs on a designated descriptor. Objects interested in receiving callbacks must implement
// the lam_reactor_listener_t interface.
//
/*
* Utilizes select() to provide callbacks when an event
* (e.g. readable,writeable,exception) occurs on a designated
* descriptor. Objects interested in receiving callbacks must
* implement the lam_reactor_listener_t interface.
*/
typedef struct _lam_reactor_listener {
void *rl_user_data;