Skip to content

Commit 1824973

Browse files
aescolarChromeos LUCI
authored and
Chromeos LUCI
committed
Revert "posix: add stubs for signal.h functions that need process support"
This reverts commit b2243af. PR zephyrproject-rtos#73978 introduced a regression. Unfortunately this PR cannot be reverted without reverting also Let's revert both PRs to stabilize main again towards the 3.7 release. For more details on the issue see zephyrproject-rtos#75205 (cherry picked from commit 772ba46) Original-Signed-off-by: Alberto Escolar Piedras <[email protected]> GitOrigin-RevId: 772ba46 Change-Id: I138b76bf5d9ce465010830a966cdd7636f61ad26 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5678571 Tested-by: ChromeOS Prod (Robot) <[email protected]> Commit-Queue: Fabio Baltieri <[email protected]> Reviewed-by: Fabio Baltieri <[email protected]>
1 parent 25bbab5 commit 1824973

File tree

4 files changed

+0
-99
lines changed

4 files changed

+0
-99
lines changed

include/zephyr/posix/signal.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ typedef struct {
7777
#define SIG_UNBLOCK 2
7878
#endif
7979

80-
#define SIG_DFL ((void *)0)
81-
#define SIG_IGN ((void *)1)
82-
#define SIG_ERR ((void *)-1)
83-
84-
#define SI_USER 1
85-
#define SI_QUEUE 2
86-
#define SI_TIMER 3
87-
#define SI_ASYNCIO 4
88-
#define SI_MESGQ 5
89-
9080
typedef int sig_atomic_t; /* Atomic entity type (ANSI) */
9181

9282
union sigval {
@@ -102,34 +92,12 @@ struct sigevent {
10292
int sigev_signo;
10393
};
10494

105-
typedef struct {
106-
int si_signo;
107-
int si_code;
108-
union sigval si_value;
109-
} siginfo_t;
110-
111-
struct sigaction {
112-
void (*sa_handler)(int signno);
113-
sigset_t sa_mask;
114-
int sa_flags;
115-
void (*sa_sigaction)(int signo, siginfo_t *info, void *context);
116-
};
117-
118-
unsigned int alarm(unsigned int seconds);
119-
int kill(pid_t pid, int sig);
120-
int pause(void);
121-
int raise(int signo);
122-
int sigaction(int sig, const struct sigaction *ZRESTRICT act, struct sigaction *ZRESTRICT oact);
123-
int sigpending(sigset_t *set);
124-
int sigsuspend(const sigset_t *sigmask);
125-
int sigwait(const sigset_t *ZRESTRICT set, int *ZRESTRICT signo);
12695
char *strsignal(int signum);
12796
int sigemptyset(sigset_t *set);
12897
int sigfillset(sigset_t *set);
12998
int sigaddset(sigset_t *set, int signo);
13099
int sigdelset(sigset_t *set, int signo);
131100
int sigismember(const sigset_t *set, int signo);
132-
void (*signal(int signo, void (*)(int signo)))(int signo);
133101
int sigprocmask(int how, const sigset_t *ZRESTRICT set, sigset_t *ZRESTRICT oset);
134102

135103
int pthread_sigmask(int how, const sigset_t *ZRESTRICT set, sigset_t *ZRESTRICT oset);

lib/libc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ config NEWLIB_LIBC
105105
imply POSIX_FD_MGMT_ALIAS_LSEEK
106106
imply POSIX_FILE_SYSTEM_ALIAS_FSTAT
107107
imply POSIX_MULTI_PROCESS_ALIAS_GETPID
108-
imply POSIX_SIGNALS_ALIAS_KILL
109108
help
110109
Build with newlib library. The newlib library is expected to be
111110
part of the SDK in this case.

lib/posix/options/Kconfig.signal

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ endif # POSIX_REALTIME_SIGNALS
2424
config POSIX_SIGNALS
2525
bool "POSIX signals [EXPERIMENTAL]"
2626
select EXPERIMENTAL
27-
select POSIX_MULTI_PROCESS
2827
help
2928
Enable support for POSIX signals.
3029

@@ -37,12 +36,6 @@ config POSIX_SIGNAL_STRING_DESC
3736
Use full description for the strsignal API.
3837
Will use 256 bytes of ROM.
3938

40-
# These options are intended to be used for compatibility with external POSIX
41-
# implementations such as those in Newlib or Picolibc.
42-
43-
config POSIX_SIGNALS_ALIAS_KILL
44-
bool
45-
4639
endif
4740

4841
endmenu # "Signal support"

lib/posix/options/signal.c

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -118,62 +118,3 @@ int sigprocmask(int how, const sigset_t *ZRESTRICT set, sigset_t *ZRESTRICT oset
118118
errno = ENOSYS;
119119
return -1;
120120
}
121-
122-
/*
123-
* The functions below are provided so that conformant POSIX applications and libraries can still
124-
* link.
125-
*/
126-
127-
unsigned int alarm(unsigned int seconds)
128-
{
129-
ARG_UNUSED(seconds);
130-
return 0;
131-
}
132-
133-
int kill(pid_t pid, int sig)
134-
{
135-
ARG_UNUSED(pid);
136-
ARG_UNUSED(sig);
137-
errno = ENOSYS;
138-
return -1;
139-
}
140-
#ifdef CONFIG_POSIX_SIGNALS_ALIAS_KILL
141-
FUNC_ALIAS(kill, _kill, int);
142-
#endif /* CONFIG_POSIX_SIGNALS_ALIAS_KILL */
143-
144-
int pause(void)
145-
{
146-
errno = ENOSYS;
147-
return -1;
148-
}
149-
150-
int sigaction(int sig, const struct sigaction *ZRESTRICT act, struct sigaction *ZRESTRICT oact)
151-
{
152-
ARG_UNUSED(sig);
153-
ARG_UNUSED(act);
154-
ARG_UNUSED(oact);
155-
errno = ENOSYS;
156-
return -1;
157-
}
158-
159-
int sigpending(sigset_t *set)
160-
{
161-
ARG_UNUSED(set);
162-
errno = ENOSYS;
163-
return -1;
164-
}
165-
166-
int sigsuspend(const sigset_t *sigmask)
167-
{
168-
ARG_UNUSED(sigmask);
169-
errno = ENOSYS;
170-
return -1;
171-
}
172-
173-
int sigwait(const sigset_t *ZRESTRICT set, int *ZRESTRICT sig)
174-
{
175-
ARG_UNUSED(set);
176-
ARG_UNUSED(sig);
177-
errno = ENOSYS;
178-
return -1;
179-
}

0 commit comments

Comments
 (0)