Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160407 Details for
Bug 250400
Profiling signals generated by itimer only delivered to the main thread
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test case which shows the behaviour described.
setitimer.cc (text/x-c++), 1.05 KB, created by
Neil Campbell
on 2007-08-01 12:15:32 UTC
(
hide
)
Description:
Test case which shows the behaviour described.
Filename:
MIME Type:
Creator:
Neil Campbell
Created:
2007-08-01 12:15:32 UTC
Size:
1.05 KB
patch
obsolete
>#include <sys/time.h> >#include <pthread.h> >#include <stdio.h> >#include <syscall.h> >#include <unistd.h> >#include <math.h> >#include <signal.h> >#include <stdlib.h> >#include <string.h> > >void sigHandler(int signo) >{ > fprintf(stderr, "%d: signal received\n", syscall(__NR_gettid)); >} > >void* thread(void* foo) >{ > struct itimerval itval; > if(0 != getitimer(ITIMER_VIRTUAL, &itval)) > { > perror("getitimer"); > exit(1); > } > > fprintf(stderr, "itval: %d, %d, %d, %d\n", itval.it_interval.tv_sec, itval.it_interval.tv_usec, itval.it_value.tv_sec, itval.it_value.tv_usec); > > for(int i=0; i < 1000000000; i++) > { > double a = sin(1.3); > } >} > > >int main() >{ > fprintf(stderr, "Main thread is %d\n", syscall(__NR_gettid)); > > signal(SIGVTALRM, sigHandler); > > struct itimerval itval; > itval.it_interval.tv_sec=0; > itval.it_interval.tv_usec=10; > itval.it_value.tv_sec=0; > itval.it_value.tv_usec=10; > > if(0 != setitimer(ITIMER_VIRTUAL, &itval, 0)) > { > perror("setitimer"); > exit(1); > } > > pthread_t thr; > pthread_create(&thr, 0, thread, 0); > pthread_join(thr, 0); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 250400
: 160407