Skip to content

Commit

Permalink
small stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
boazsegev committed Oct 28, 2024
1 parent eebff2d commit 26c2407
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ on:

jobs:
build:
strategy:
fail-fast: false

runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- name: Setup ENV
run: |
echo "CI=false" >> "$GITHUB_ENV"
- name: Test STL (debug) - no allocators
run: CFLAGS="-DFIO_MEMORY_DISABLE -DFIO_MEMALT" make db/test
- name: Test STL
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/macos-c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ on:

jobs:
build:
strategy:
fail-fast: false

runs-on: macos-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- name: Setup ENV
run: |
echo "CI=false" >> "$GITHUB_ENV"
- name: Test STL (debug) - no allocators
run: CFLAGS="-DFIO_MEMORY_DISABLE -DFIO_MEMALT" make db/test
- name: Test STL
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ on:

jobs:
build:
strategy:
fail-fast: false

runs-on: windows-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Setup ENV
run: |
echo "CI=false" >> "$GITHUB_ENV"
- name: Test No-Op (debug)
run: cl /Od /RTCsu /TC tests\noop.c /I. /D_CRT_NONSTDC_NO_WARNINGS /DFIO_LEAK_COUNTER=1 /DDEBUG /Fe./noop.exe && ./noop.exe
- name: Test STL (debug) - no allocators
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/windows_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

jobs:
build:
strategy:
fail-fast: false

runs-on: windows-latest
timeout-minutes: 30
Expand All @@ -17,6 +19,9 @@ jobs:
- uses: egor-tensin/setup-clang@v1
with:
platform: x64
- name: Setup ENV
run: |
echo "CI=false" >> "$GITHUB_ENV"
- name: Test No-Op (debug)
run: clang -O0 -fstack-protector-all tests\noop.c -I. -DFIO_LEAK_COUNTER=1 -DDEBUG -D_CRT_NONSTDC_NO_WARNINGS -o ./noop.exe && ./noop.exe
- name: Test STL (debug) - no allocators
Expand Down
5 changes: 3 additions & 2 deletions fio-stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20720,7 +20720,7 @@ SFUNC int fio_bstr_reallocate(fio_str_info_s *dest, size_t len) {
size_t new_capa = fio_string_capa4len(len + sizeof(bstr_m[0]));
if (FIO_UNLIKELY(new_capa > (size_t)0xFFFFFFFFULL))
new_capa = (size_t)0x0FFFFFFFFULL + sizeof(bstr_m[0]);
if (dest->capa < fio_string_capa4len(sizeof(bstr_m[0])) - 1)
if (dest->capa < fio_string_capa4len(sizeof(bstr_m[0])))
goto copy_the_string;
bstr_m = (fio___bstr_meta_s *)FIO_MEM_REALLOC_(
((fio___bstr_meta_s *)dest->buf - 1),
Expand Down Expand Up @@ -32895,7 +32895,8 @@ FIO_SFUNC void fio_s_init(fio_s *io) {

FIO_IFUNC void fio___s_monitor_in(fio_s *io) {
if ((fio_atomic_or(&io->pflags, FIO___IO_STATE_POLLIN_SET) &
FIO___IO_STATE_POLLIN_SET) == FIO___IO_STATE_POLLIN_SET)
(FIO___IO_STATE_POLLIN_SET | FIO___IO_STATE_SUSPENDED |
FIO___IO_STATE_THROTTLED | FIO___IO_STATE_CLOSING)))
return;
fio_poll_monitor(&fio___srvdata.poll_data, io->fd, (void *)io, POLLIN);
}
Expand Down
2 changes: 1 addition & 1 deletion fio-stl/102 string core.h
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ SFUNC int fio_bstr_reallocate(fio_str_info_s *dest, size_t len) {
size_t new_capa = fio_string_capa4len(len + sizeof(bstr_m[0]));
if (FIO_UNLIKELY(new_capa > (size_t)0xFFFFFFFFULL))
new_capa = (size_t)0x0FFFFFFFFULL + sizeof(bstr_m[0]);
if (dest->capa < fio_string_capa4len(sizeof(bstr_m[0])) - 1)
if (dest->capa < fio_string_capa4len(sizeof(bstr_m[0])))
goto copy_the_string;
bstr_m = (fio___bstr_meta_s *)FIO_MEM_REALLOC_(
((fio___bstr_meta_s *)dest->buf - 1),
Expand Down
3 changes: 2 additions & 1 deletion fio-stl/400 server.h
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,8 @@ FIO_SFUNC void fio_s_init(fio_s *io) {

FIO_IFUNC void fio___s_monitor_in(fio_s *io) {
if ((fio_atomic_or(&io->pflags, FIO___IO_STATE_POLLIN_SET) &
FIO___IO_STATE_POLLIN_SET) == FIO___IO_STATE_POLLIN_SET)
(FIO___IO_STATE_POLLIN_SET | FIO___IO_STATE_SUSPENDED |
FIO___IO_STATE_THROTTLED | FIO___IO_STATE_CLOSING)))
return;
fio_poll_monitor(&fio___srvdata.poll_data, io->fd, (void *)io, POLLIN);
}
Expand Down

0 comments on commit 26c2407

Please sign in to comment.