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 294909 Details for
Bug 432795
Add atomic operation for super-H(sh3,4) arche.
[?]
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.
alsa-lib-1.0.3a-sh-linux.patch
alsa-lib-1.0.3a-sh-linux.patch (text/x-patch), 1.72 KB, created by
CHIKAMA Masaki
on 2008-02-14 12:58:02 UTC
(
hide
)
Description:
alsa-lib-1.0.3a-sh-linux.patch
Filename:
MIME Type:
Creator:
CHIKAMA Masaki
Created:
2008-02-14 12:58:02 UTC
Size:
1.72 KB
patch
obsolete
>--- include/iatomic.h~ 2004-09-19 10:38:37.759487953 -0400 >+++ include/iatomic.h 2004-09-19 11:11:21.014762353 -0400 >@@ -1010,6 +1010,75 @@ > > #endif /* __arm__ */ > >+#ifdef __sh__ >+ >+typedef struct { volatile int counter; } atomic_t; >+ >+#define ATOMIC_INIT(i) { (i) } >+ >+#define atomic_read(v) ((v)->counter) >+#define atomic_set(v,i) (((v)->counter) = (i)) >+ >+#define atomic_dec_return(v) atomic_sub_return(1,(v)) >+#define atomic_inc_return(v) atomic_add_return(1,(v)) >+ >+#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) >+#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) >+#define atomic_inc_and_test(v) (atomic_add_return(1, (v)) != 0) >+ >+#define atomic_add(i,v) atomic_add_return((i),(v)) >+#define atomic_sub(i,v) atomic_sub_return((i),(v)) >+#define atomic_inc(v) atomic_add(1,(v)) >+#define atomic_dec(v) atomic_sub(1,(v)) >+ >+static __inline__ int atomic_add_return(int i, volatile atomic_t *v) >+{ >+ int result; >+ >+ asm volatile ( >+ " .align 2\n" >+ " mova 99f, r0\n" >+ " mov r15, r1\n" >+ " mov #-6, r15\n" >+ " mov.l @%2, %0\n" >+ " add %1, %0\n" >+ " mov.l %0, @%2\n" >+ "99: mov r1, r15" >+ : "=&r"(result) >+ : "r"(i), "r"(v) >+ : "r0", "r1"); >+ >+ return result; >+} >+ >+static __inline__ int atomic_sub_return(int i, volatile atomic_t *v) >+{ >+ int result; >+ >+ asm volatile ( >+ " .align 2\n" >+ " mova 99f, r0\n" >+ " mov r15, r1\n" >+ " mov #-6, r15\n" >+ " mov.l @%2, %0\n" >+ " sub %1, %0\n" >+ " mov.l %0, @%2\n" >+ "99: mov r1, r15" >+ : "=&r"(result) >+ : "r"(i), "r"(v) >+ : "r0", "r1"); >+ >+ return result; >+} >+ >+#define mb() __asm__ __volatile__ ("" : : : "memory") >+#define rmb() mb() >+#define wmb() mb() >+ >+#define IATOMIC_DEFINED 1 >+ >+#endif /* __sh__ */ >+ > #ifndef IATOMIC_DEFINED > /* > * non supported architecture.
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 432795
: 294909