Compare commits
13 Commits
f586c8e03f
...
9864bd39be
| Author | SHA1 | Date |
|---|---|---|
|
|
9864bd39be | |
|
|
795b328bd6 | |
|
|
ac5f4a584f | |
|
|
c044906e63 | |
|
|
ccc84945d3 | |
|
|
c4b6f1fcb5 | |
|
|
017ca1efe7 | |
|
|
71b2229427 | |
|
|
446fa6b815 | |
|
|
98948c11bf | |
|
|
d60b141a21 | |
|
|
86bab518c6 | |
|
|
a16fde8070 |
3
HISTORY
3
HISTORY
|
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
Version 1.83 2025-11-15
|
||||||
|
* fast_task_queue.h: remove field finish_callback
|
||||||
|
|
||||||
Version 1.82 2025-11-04
|
Version 1.82 2025-11-04
|
||||||
* set use_io_uring explicitly
|
* set use_io_uring explicitly
|
||||||
|
|
||||||
|
|
|
||||||
2
INSTALL
2
INSTALL
|
|
@ -21,5 +21,5 @@ Debian, Ubuntu etc.:
|
||||||
# the command lines as:
|
# the command lines as:
|
||||||
|
|
||||||
git clone https://github.com/happyfish100/libfastcommon.git
|
git clone https://github.com/happyfish100/libfastcommon.git
|
||||||
cd libfastcommon; git checkout V1.0.81
|
cd libfastcommon; git checkout V1.0.83
|
||||||
./make.sh clean && ./make.sh && sudo ./make.sh install
|
./make.sh clean && ./make.sh && sudo ./make.sh install
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
libfastcommon (1.0.83-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* upgrade to 1.0.83-1
|
||||||
|
|
||||||
|
-- YuQing <384681@qq.com> Sun, 23 Nov 2025 10:47:37 +0000
|
||||||
|
|
||||||
|
libfastcommon (1.0.83-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* upgrade to 1.0.83-1
|
||||||
|
|
||||||
|
-- YuQing <384681@qq.com> Sun, 23 Nov 2025 10:00:00 +0000
|
||||||
|
|
||||||
|
libfastcommon (1.0.83-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* upgrade to 1.0.83-1
|
||||||
|
|
||||||
|
-- YuQing <384681@qq.com> Sun, 23 Nov 2025 09:05:57 +0000
|
||||||
|
|
||||||
libfastcommon (1.0.78-1) unstable; urgency=medium
|
libfastcommon (1.0.78-1) unstable; urgency=medium
|
||||||
|
|
||||||
* upgrade to 1.0.78-1
|
* upgrade to 1.0.78-1
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
%define CommitVersion %(echo $COMMIT_VERSION)
|
%define CommitVersion %(echo $COMMIT_VERSION)
|
||||||
|
|
||||||
Name: libfastcommon
|
Name: libfastcommon
|
||||||
Version: 1.0.81
|
Version: 1.0.83
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: c common functions library extracted from my open source projects FastDFS
|
Summary: c common functions library extracted from my open source projects FastDFS
|
||||||
License: LGPL
|
License: LGPL
|
||||||
|
|
@ -19,10 +19,10 @@ Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
|
||||||
|
|
||||||
%define kernel_major %(uname -r | cut -d'.' -f1)
|
%define kernel_major %(uname -r | cut -d'.' -f1)
|
||||||
%define kernel_minor %(uname -r | cut -d'.' -f2)
|
%define kernel_minor %(uname -r | cut -d'.' -f2)
|
||||||
%define kernel_ver_int %(expr %{kernel_major} \* 100 + %{kernel_minor})
|
%define kernel_ver_int %(expr %{kernel_major} \\* 100 + %{kernel_minor})
|
||||||
%if %{kernel_ver_int} >= 514
|
%if %{kernel_ver_int} >= 514
|
||||||
BuildRequires: liburing-devel >= 2.5
|
BuildRequires: liburing-devel >= 2.4
|
||||||
Requires: liburing >= 2.5
|
Requires: liburing >= 2.4
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ libfastcommon.a: $(FAST_STATIC_OBJS)
|
||||||
.c:
|
.c:
|
||||||
$(COMPILE) -o $@ $< $(FAST_STATIC_OBJS) $(LIB_PATH) $(INC_PATH)
|
$(COMPILE) -o $@ $< $(FAST_STATIC_OBJS) $(LIB_PATH) $(INC_PATH)
|
||||||
.c.o:
|
.c.o:
|
||||||
$(COMPILE) -c -o $@ $< $(INC_PATH)
|
$(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
|
||||||
.c.lo:
|
.c.lo:
|
||||||
$(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
|
$(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
|
||||||
install:
|
install:
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ struct nio_thread_data;
|
||||||
struct fast_task_info;
|
struct fast_task_info;
|
||||||
|
|
||||||
typedef int (*ThreadLoopCallback) (struct nio_thread_data *pThreadData);
|
typedef int (*ThreadLoopCallback) (struct nio_thread_data *pThreadData);
|
||||||
typedef int (*TaskFinishCallback) (struct fast_task_info *task);
|
|
||||||
typedef void (*TaskCleanUpCallback) (struct fast_task_info *task);
|
typedef void (*TaskCleanUpCallback) (struct fast_task_info *task);
|
||||||
typedef int (*TaskInitCallback)(struct fast_task_info *task, void *arg);
|
typedef int (*TaskInitCallback)(struct fast_task_info *task, void *arg);
|
||||||
typedef void (*TaskReleaseCallback)(struct fast_task_info *task);
|
typedef void (*TaskReleaseCallback)(struct fast_task_info *task);
|
||||||
|
|
@ -149,7 +148,6 @@ struct fast_task_info
|
||||||
struct fc_list_head dlink; //for polling queue
|
struct fc_list_head dlink; //for polling queue
|
||||||
} polling; //for RDMA busy polling
|
} polling; //for RDMA busy polling
|
||||||
TaskContinueCallback continue_callback; //for continue stage
|
TaskContinueCallback continue_callback; //for continue stage
|
||||||
TaskFinishCallback finish_callback;
|
|
||||||
struct nio_thread_data *thread_data;
|
struct nio_thread_data *thread_data;
|
||||||
struct sf_network_handler *handler; //network handler for libserverframe nio
|
struct sf_network_handler *handler; //network handler for libserverframe nio
|
||||||
struct fast_task_info *next; //for free queue and deleted list
|
struct fast_task_info *next; //for free queue and deleted list
|
||||||
|
|
|
||||||
|
|
@ -145,12 +145,9 @@ static void deal_timeouts(FastTimerEntry *head)
|
||||||
/* must set NULL because NOT in time wheel */
|
/* must set NULL because NOT in time wheel */
|
||||||
current->prev = current->next = NULL;
|
current->prev = current->next = NULL;
|
||||||
pEventEntry = (IOEventEntry *)current;
|
pEventEntry = (IOEventEntry *)current;
|
||||||
if (pEventEntry != NULL)
|
|
||||||
{
|
|
||||||
pEventEntry->callback(pEventEntry->fd, IOEVENT_TIMEOUT, current);
|
pEventEntry->callback(pEventEntry->fd, IOEVENT_TIMEOUT, current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int ioevent_loop(struct nio_thread_data *thread_data,
|
int ioevent_loop(struct nio_thread_data *thread_data,
|
||||||
IOEventCallback recv_notify_callback, TaskCleanUpCallback
|
IOEventCallback recv_notify_callback, TaskCleanUpCallback
|
||||||
|
|
@ -243,7 +240,7 @@ int ioevent_loop(struct nio_thread_data *thread_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thread_data->deleted_list != NULL) {
|
if (thread_data->deleted_list != NULL) {
|
||||||
count = 0;
|
//count = 0;
|
||||||
while (thread_data->deleted_list != NULL) {
|
while (thread_data->deleted_list != NULL) {
|
||||||
task = thread_data->deleted_list;
|
task = thread_data->deleted_list;
|
||||||
thread_data->deleted_list = task->next;
|
thread_data->deleted_list = task->next;
|
||||||
|
|
@ -257,7 +254,7 @@ int ioevent_loop(struct nio_thread_data *thread_data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clean_up_callback(task);
|
clean_up_callback(task);
|
||||||
count++;
|
//count++;
|
||||||
}
|
}
|
||||||
//logInfo("cleanup task count: %d", count);
|
//logInfo("cleanup task count: %d", count);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1636,16 +1636,29 @@ static inline int fc_ltostr_ex(int64_t n, char *buff, const int padding_len)
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(OS_LINUX) && defined(__GNUC__) && __GNUC__ >= 8
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||||
|
#endif
|
||||||
|
|
||||||
fill_len = padding_len - len;
|
fill_len = padding_len - len;
|
||||||
memmove(buff + fill_len, buff, len + 1);
|
memmove(buff + fill_len, buff, len + 1);
|
||||||
memset(buff, '0', fill_len);
|
memset(buff, '0', fill_len);
|
||||||
|
|
||||||
|
#if defined(OS_LINUX) && defined(__GNUC__) && __GNUC__ >= 8
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
return padding_len;
|
return padding_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int fc_ltostr(int64_t n, char *buff)
|
static inline int fc_ltostr(int64_t n, char *buff)
|
||||||
{
|
{
|
||||||
const int padding_len = 0;
|
int len;
|
||||||
return fc_ltostr_ex(n, buff, padding_len);
|
|
||||||
|
len = fc_itoa(n, buff);
|
||||||
|
*(buff + len) = '\0';
|
||||||
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline size_t fc_strlcpy(char *dest, const char *src, const size_t size)
|
static inline size_t fc_strlcpy(char *dest, const char *src, const size_t size)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue