src/dbs/atrshmlogreaderd_db.c
int create_writer()
{
#if  ATRSHMLOG_USE_PTHREAD  == 1
  
  pthread_t tmp;

  int ret = pthread_create(&tmp,
			   NULL,
			   f_list_buffer_write_proc,
			   NULL);

  f_list_buffer_write = (atrshmlog_tid_t) tmp;
  
#endif

#if  ATRSHMLOG_USE_C11_THREAD == 1
  int ret = thrd_create( (thrd_t*)&f_list_buffer_write,
			 f_list_buffer_write_proc,
			 NULL);
#endif

#if ATRSHMLOG_USE_WINTHREAD == 1
  int ret = 0;
  
  uintptr_t rethandle = _beginthread (
				      f_list_buffer_write_proc,
				      0, // stacksize by system
				      NULL // no arguments
				      );

  if (rethandle == 0)
    {
      ret = -1;
    }

  if (rethandle == -1L)
    {
      ret = -1;
    }

#endif

  return ret;
}
/**
 * the start of a write thread
 */
the start of a write thread
the start of a write thread
int create_writer()
{
#if  ATRSHMLOG_USE_PTHREAD  == 1
  pthread_t tmp;
  int ret = pthread_create(&tmp,
			   NULL,
			   f_list_buffer_write_proc,
			   NULL);
  f_list_buffer_write = (atrshmlog_tid_t) tmp;
#endif
#if  ATRSHMLOG_USE_C11_THREAD == 1
  int ret = thrd_create( (thrd_t*)&f_list_buffer_write,
			 f_list_buffer_write_proc,
			 NULL);
#endif
#if ATRSHMLOG_USE_WINTHREAD == 1
  int ret = 0;
  uintptr_t rethandle = _beginthread (
				      f_list_buffer_write_proc,
				      0, 
				      NULL 
				      );
  if (rethandle == 0)
    {
      ret = -1;
    }
  if (rethandle == -1L)
    {
      ret = -1;
    }
#endif
  return ret;
}
int create_writer ( ) { #if ATRSHMLOG_USE_PTHREAD == 1 pthread_t tmp ; int ret = pthread_create ( & tmp , NULL , f_list_buffer_write_proc , NULL ) ; f_list_buffer_write = ( atrshmlog_tid_t ) tmp ; #endif #if ATRSHMLOG_USE_C11_THREAD == 1 int ret = thrd_create ( ( thrd_t * ) & f_list_buffer_write , f_list_buffer_write_proc , NULL ) ; #endif #if ATRSHMLOG_USE_WINTHREAD == 1 int ret = 0 ; uintptr_t rethandle = _beginthread ( f_list_buffer_write_proc , 0 , NULL ) ; if ( rethandle == 0 ) { ret = -1 ; } if ( rethandle == -1L ) { ret = -1 ; } #endif return ret ; }
the start of a write thread
the start of a write thread
// stacksize by system // no arguments